Skip to content

Instantly share code, notes, and snippets.

@seanredmond
Created August 19, 2012 23:17
Show Gist options
  • Save seanredmond/3398453 to your computer and use it in GitHub Desktop.
Save seanredmond/3398453 to your computer and use it in GitHub Desktop.
Trivial Ruby object example
#!/usr/bin/env ruby
# encoding: utf-8
class Greetings
def greet(recipient = "World")
puts "Hello, #{recipient}"
end
end
g = Greetings.new
if ARGV.count < 1
g.greet()
else
g.greet(ARGV.first)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment