Skip to content

Instantly share code, notes, and snippets.

@jpalala
Created July 2, 2011 00:05
Show Gist options
  • Save jpalala/1059610 to your computer and use it in GitHub Desktop.
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!)
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