Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Fixnum
- def method_missing(method_id, *args)
- name = method_id.to_s
- if name =~ /^second|minute|hour$/
- self.send(name + 's')
- else
- super # pass the buck to superclass
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement