Module: Happened
- Defined in:
- lib/happened.rb,
lib/happened/version.rb
Constant Summary collapse
- VERSION =
"0.1.0"
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(mname, *args, &block) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/happened.rb', line 4 def method_missing(mname, *args, &block) m = mname.to_s at_attribute = m.gsub('?', '_at') if m[-1] == '?' && respond_to?(at_attribute) !!self.send(at_attribute) else super end end |