Memoize WWW::Mechanize instance.
This commit is contained in:
parent
72123c1cec
commit
c647ae98bb
@ -36,7 +36,7 @@ module Webrat #:nodoc:
|
||||
end
|
||||
|
||||
def mechanize
|
||||
@mechanize = WWW::Mechanize.new
|
||||
@mechanize ||= WWW::Mechanize.new
|
||||
end
|
||||
|
||||
def_delegators :mechanize, :basic_auth
|
||||
|
Loading…
Reference in New Issue
Block a user