Class: ActionMerge::Peer
- Inherits:
-
Object
- Object
- ActionMerge::Peer
- Defined in:
- app/models/action_merge/peer.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#isEphemeral ⇒ Object
Returns the value of attribute isEphemeral.
-
#model ⇒ Object
Returns the value of attribute model.
-
#storageId ⇒ Object
Returns the value of attribute storageId.
Instance Method Summary collapse
-
#initialize(id, isEphemeral: nil, storageId: nil, model: nil) ⇒ Peer
constructor
A new instance of Peer.
- #metadata ⇒ Object
- #to_gid_param ⇒ Object
Constructor Details
#initialize(id, isEphemeral: nil, storageId: nil, model: nil) ⇒ Peer
Returns a new instance of Peer.
5 6 7 8 9 10 |
# File 'app/models/action_merge/peer.rb', line 5 def initialize(id, isEphemeral: nil, storageId: nil, model: nil) @id = id @isEphemeral = isEphemeral @storageId = storageId @model = model end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'app/models/action_merge/peer.rb', line 3 def id @id end |
#isEphemeral ⇒ Object
Returns the value of attribute isEphemeral.
3 4 5 |
# File 'app/models/action_merge/peer.rb', line 3 def isEphemeral @isEphemeral end |
#model ⇒ Object
Returns the value of attribute model.
3 4 5 |
# File 'app/models/action_merge/peer.rb', line 3 def model @model end |
#storageId ⇒ Object
Returns the value of attribute storageId.
3 4 5 |
# File 'app/models/action_merge/peer.rb', line 3 def storageId @storageId end |
Instance Method Details
#metadata ⇒ Object
12 13 14 15 16 17 |
# File 'app/models/action_merge/peer.rb', line 12 def { isEphemeral:, storageId: } end |
#to_gid_param ⇒ Object
19 20 21 |
# File 'app/models/action_merge/peer.rb', line 19 def to_gid_param [[@model.class.name, @model.id], id] end |