method
method_missing
rails latest stable - Class:
ActiveResource::Base
method_missing(method_symbol, *arguments)private
No documentation available.
# File activeresource/lib/active_resource/base.rb, line 1456
def method_missing(method_symbol, *arguments) #:nodoc:
method_name = method_symbol.to_s
if method_name =~ /(=|\?)$/
case $1
when "="
attributes[$`] = arguments.first
when "?"
attributes[$`]
end
else
return attributes[method_name] if attributes.include?(method_name)
# not set right now but we know about it
return nil if known_attributes.include?(method_name)
super
end
end