Memoize WWW::Mechanize instance.
This commit is contained in:
parent
72123c1cec
commit
c647ae98bb
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user