Class: ViewModel::ActiveRecord::UpdateOperation::ReferencedCollectionMember
- Inherits:
-
Object
- Object
- ViewModel::ActiveRecord::UpdateOperation::ReferencedCollectionMember
- Defined in:
- lib/view_model/active_record/update_operation.rb
Instance Attribute Summary collapse
-
#direct_viewmodel ⇒ Object
readonly
Returns the value of attribute direct_viewmodel.
-
#indirect_viewmodel_reference ⇒ Object
readonly
Returns the value of attribute indirect_viewmodel_reference.
-
#position ⇒ Object
Returns the value of attribute position.
-
#ref_string ⇒ Object
Returns the value of attribute ref_string.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
-
#initialize(indirect_viewmodel_reference, direct_viewmodel) ⇒ ReferencedCollectionMember
constructor
A new instance of ReferencedCollectionMember.
Constructor Details
#initialize(indirect_viewmodel_reference, direct_viewmodel) ⇒ ReferencedCollectionMember
Returns a new instance of ReferencedCollectionMember.
680 681 682 683 684 685 686 |
# File 'lib/view_model/active_record/update_operation.rb', line 680 def initialize(indirect_viewmodel_reference, direct_viewmodel) @indirect_viewmodel_reference = indirect_viewmodel_reference @direct_viewmodel = direct_viewmodel if direct_viewmodel.class._list_member? @position = direct_viewmodel._list_attribute end end |
Instance Attribute Details
#direct_viewmodel ⇒ Object (readonly)
Returns the value of attribute direct_viewmodel.
677 678 679 |
# File 'lib/view_model/active_record/update_operation.rb', line 677 def direct_viewmodel @direct_viewmodel end |
#indirect_viewmodel_reference ⇒ Object (readonly)
Returns the value of attribute indirect_viewmodel_reference.
677 678 679 |
# File 'lib/view_model/active_record/update_operation.rb', line 677 def indirect_viewmodel_reference @indirect_viewmodel_reference end |
#position ⇒ Object
Returns the value of attribute position.
678 679 680 |
# File 'lib/view_model/active_record/update_operation.rb', line 678 def position @position end |
#ref_string ⇒ Object
Returns the value of attribute ref_string.
678 679 680 |
# File 'lib/view_model/active_record/update_operation.rb', line 678 def ref_string @ref_string end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
688 689 690 691 |
# File 'lib/view_model/active_record/update_operation.rb', line 688 def ==(other) other.class == self.class && other.indirect_viewmodel_reference == self.indirect_viewmodel_reference end |