Module: ActiveResourceFixes
- Included in:
- ActiveResourceFixes30, ActiveResourceFixes31
- Defined in:
- lib/remotable/active_resource_fixes.rb
Instance Method Summary collapse
-
#respond_to?(method_symbol, include_private = false) ⇒ Boolean
ActiveResource hacks method_missing without hacking respond_to? In fact, it responds to any method that ends in an equals sign.
Instance Method Details
#respond_to?(method_symbol, include_private = false) ⇒ Boolean
ActiveResource hacks method_missing without hacking respond_to? In fact, it responds to any method that ends in an equals sign. It also responds to any method that matches an attribute name.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/remotable/active_resource_fixes.rb', line 9 def respond_to?(method_symbol, include_private=false) method_name = method_symbol.to_s if method_name =~ /\w+=/ true elsif attributes.include?(method_name) true else super(method_symbol, include_private) end end |