Memoize WWW::Mechanize instance.

This commit is contained in:
Mark Menard 2009-03-05 17:45:56 -05:00
parent 72123c1cec
commit c647ae98bb

View File

@ -36,7 +36,7 @@ module Webrat #:nodoc:
end end
def mechanize def mechanize
@mechanize = WWW::Mechanize.new @mechanize ||= WWW::Mechanize.new
end end
def_delegators :mechanize, :basic_auth def_delegators :mechanize, :basic_auth