Method: Panda::Base#method_missing
- Defined in:
- lib/panda/base.rb
#method_missing(method_symbol, *arguments) ⇒ Object (private)
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/panda/base.rb', line 93 def method_missing(method_symbol, *arguments) method_name = method_symbol.to_s if method_name =~ /(=|\?)$/ case $1 when '=' attributes[$`] = arguments.first @changed_attributes[$`] = arguments.first when '?' !! attributes[$`] end else return attributes[method_name] if attributes.include?(method_name) super end end |