Last active
December 31, 2015 16:02
-
-
Save yous/c6200cd90a051db4323a to your computer and use it in GitHub Desktop.
Happy New Year
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 Happy | |
def initialize | |
print "#{self.class} New " | |
@year = Time.new.year | |
end | |
def method_missing(meth) | |
puts "#{__method__.to_s[/\w+/].capitalize} #{@year}#{meth.to_s[/\W+/]}" | |
end | |
end | |
Happy.new.year | |
Happy.new.year! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment