Created
April 2, 2009 16:14
-
-
Save bhenderson/89270 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class YMech < WWW::Mechanize | |
private_class_method :new | |
def YMech.create | |
#do some stuff, define a global variable | |
# | |
# so my question is, how do I pass a block that I can also then pass to `new`? | |
# example of how you normally pass a block to new | |
#a = WWW::Mechanize.new { |agent| | |
# agent.follow_meta_refresh = true | |
# } | |
# so my question is, how do I pass a block that I can also then pass to `new`? | |
new | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment