Created
July 2, 2011 00:05
-
-
Save jpalala/1059610 to your computer and use it in GitHub Desktop.
testing out command line arguments in ruby (and it was not that hard!)
This file contains hidden or 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 FooBar | |
def initialize(foo) | |
@foo = foo | |
end | |
def foo | |
puts "FooBar#foo @foo: #{@foo}" | |
end | |
def self.bar(options={}) | |
puts "FooBar.bar options[:thing]: #{options[:thing]}" | |
end | |
end | |
if(ARGV[0]) | |
puts ARGV[0] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment