Module: ActiveRemote::QueryAttributes
- Extended by:
- ActiveSupport::Concern
- Included in:
- Base
- Defined in:
- lib/active_remote/query_attributes.rb
Overview
QueryAttributes provides instance methods for querying attributes.
Instance Method Summary collapse
-
#query_attribute(name) ⇒ Object
Test the presence of an attribute.
Instance Method Details
#query_attribute(name) ⇒ Object
Test the presence of an attribute
See Typecasting::BooleanTypecaster.call for more details.
31 32 33 34 35 36 37 |
# File 'lib/active_remote/query_attributes.rb', line 31 def query_attribute(name) if respond_to?("#{name}?") send("#{name}?") else raise ::ActiveRemote::UnknownAttributeError, "unknown attribute: #{name}" end end |