Module: Postmen::CollectionProxy::ClassMethods
- Defined in:
- lib/postmen/collection_proxy.rb
Instance Attribute Summary collapse
-
#settings ⇒ Object
readonly
Returns the value of attribute settings.
Instance Method Summary collapse
Instance Attribute Details
#settings ⇒ Object (readonly)
Returns the value of attribute settings.
7 8 9 |
# File 'lib/postmen/collection_proxy.rb', line 7 def settings @settings end |
Instance Method Details
#get(response) ⇒ Object
19 20 21 |
# File 'lib/postmen/collection_proxy.rb', line 19 def get(response) model.new(response[:data]) end |
#key(key = nil) ⇒ Object
14 15 16 17 |
# File 'lib/postmen/collection_proxy.rb', line 14 def key(key = nil) return settings[:key] unless key settings[:key] = key end |
#model(model = nil) ⇒ Object
9 10 11 12 |
# File 'lib/postmen/collection_proxy.rb', line 9 def model(model = nil) return settings[:model] unless model settings[:model] = model end |