Class: ZeusSdk::V1::Node
- Inherits:
-
Object
- Object
- ZeusSdk::V1::Node
- Defined in:
- lib/zeus_sdk/v1/models/multiplayer/node.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#document_id ⇒ Object
Returns the value of attribute document_id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#node_id ⇒ Object
Returns the value of attribute node_id.
-
#properties ⇒ Object
Returns the value of attribute properties.
-
#raw ⇒ Object
Returns the value of attribute raw.
-
#type ⇒ Object
Returns the value of attribute type.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
Instance Method Summary collapse
- #as_json(options = {}) ⇒ Object
-
#initialize(node) ⇒ Node
constructor
A new instance of Node.
- #to_s ⇒ Object
Constructor Details
#initialize(node) ⇒ Node
Returns a new instance of Node.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/zeus_sdk/v1/models/multiplayer/node.rb', line 5 def initialize(node) self.raw = node self.node_id = node["id"] self.document_id = node["document_id"] self.name = node["name"] self.type = node["type"] self.properties = node["properties"] self.created_at = node["created_at"] self.updated_at = node["updated_at"] end |
Instance Attribute Details
#created_at ⇒ Object
Returns the value of attribute created_at.
3 4 5 |
# File 'lib/zeus_sdk/v1/models/multiplayer/node.rb', line 3 def created_at @created_at end |
#document_id ⇒ Object
Returns the value of attribute document_id.
3 4 5 |
# File 'lib/zeus_sdk/v1/models/multiplayer/node.rb', line 3 def document_id @document_id end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/zeus_sdk/v1/models/multiplayer/node.rb', line 3 def name @name end |
#node_id ⇒ Object
Returns the value of attribute node_id.
3 4 5 |
# File 'lib/zeus_sdk/v1/models/multiplayer/node.rb', line 3 def node_id @node_id end |
#properties ⇒ Object
Returns the value of attribute properties.
3 4 5 |
# File 'lib/zeus_sdk/v1/models/multiplayer/node.rb', line 3 def properties @properties end |
#raw ⇒ Object
Returns the value of attribute raw.
3 4 5 |
# File 'lib/zeus_sdk/v1/models/multiplayer/node.rb', line 3 def raw @raw end |
#type ⇒ Object
Returns the value of attribute type.
3 4 5 |
# File 'lib/zeus_sdk/v1/models/multiplayer/node.rb', line 3 def type @type end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
3 4 5 |
# File 'lib/zeus_sdk/v1/models/multiplayer/node.rb', line 3 def updated_at @updated_at end |
Instance Method Details
#as_json(options = {}) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/zeus_sdk/v1/models/multiplayer/node.rb', line 16 def as_json(={}) return { id: self.node_id, document_id: self.document_id, name: self.name, type: self.type, properties: self.properties, created_at: self.created_at, updated_at: self.updated_at } end |
#to_s ⇒ Object
28 29 30 |
# File 'lib/zeus_sdk/v1/models/multiplayer/node.rb', line 28 def to_s "Node(id: #{self.node_id}, document_id: #{self.document_id}, name: #{self.name}, type: #{self.type}, properties: #{self.properties}, created_at: #{self.created_at}, updated_at: #{self.updated_at})" end |