Class: ApiResource::Associations::MultiObjectProxy
- Inherits:
-
AssociationProxy
- Object
- AssociationProxy
- ApiResource::Associations::MultiObjectProxy
- Includes:
- Enumerable
- Defined in:
- lib/api_resource/associations.rb
Instance Attribute Summary
Attributes inherited from AssociationProxy
#klass, #loaded, #remote_path, #scopes, #times_loaded
Instance Method Summary collapse
- #all ⇒ Object
- #each(*args, &block) ⇒ Object
-
#internal_object ⇒ Object
force a load when calling this method.
- #serializable_hash(options) ⇒ Object
Methods inherited from AssociationProxy
#initialize, #inspect, #method_missing, #reload, #scope?, #to_s
Constructor Details
This class inherits a constructor from ApiResource::Associations::AssociationProxy
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ApiResource::Associations::AssociationProxy
Instance Method Details
#all ⇒ Object
415 416 417 |
# File 'lib/api_resource/associations.rb', line 415 def all self.internal_object end |
#each(*args, &block) ⇒ Object
419 420 421 |
# File 'lib/api_resource/associations.rb', line 419 def each(*args, &block) self.internal_object.each(*args, &block) end |
#internal_object ⇒ Object
force a load when calling this method
428 429 430 |
# File 'lib/api_resource/associations.rb', line 428 def internal_object @internal_object ||= self.(:all, {}) end |
#serializable_hash(options) ⇒ Object
423 424 425 |
# File 'lib/api_resource/associations.rb', line 423 def serializable_hash() self.internal_object.collect{|obj| obj.serializable_hash() } end |