Class: ZeusSdk::V1::Document
- Inherits:
-
Object
- Object
- ZeusSdk::V1::Document
- Defined in:
- lib/zeus_sdk/v1/models/multiplayer/document.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.
-
#raw ⇒ Object
Returns the value of attribute raw.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
Instance Method Summary collapse
- #as_json(options = {}) ⇒ Object
-
#initialize(doc) ⇒ Document
constructor
A new instance of Document.
- #to_s ⇒ Object
Constructor Details
#initialize(doc) ⇒ Document
Returns a new instance of Document.
5 6 7 8 9 10 11 |
# File 'lib/zeus_sdk/v1/models/multiplayer/document.rb', line 5 def initialize(doc) self.raw = doc self.document_id = doc["id"] self.name = doc["name"] self.created_at = doc["created_at"] self.updated_at = doc["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/document.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/document.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/document.rb', line 3 def name @name end |
#raw ⇒ Object
Returns the value of attribute raw.
3 4 5 |
# File 'lib/zeus_sdk/v1/models/multiplayer/document.rb', line 3 def raw @raw end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
3 4 5 |
# File 'lib/zeus_sdk/v1/models/multiplayer/document.rb', line 3 def updated_at @updated_at end |
Instance Method Details
#as_json(options = {}) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/zeus_sdk/v1/models/multiplayer/document.rb', line 13 def as_json(={}) return { id: self.document_id, name: self.name, created_at: self.created_at, updated_at: self.updated_at } end |
#to_s ⇒ Object
22 23 24 |
# File 'lib/zeus_sdk/v1/models/multiplayer/document.rb', line 22 def to_s "Document(id: #{self.document_id}, name: #{self.name})" end |