Class: ZeusClient::V1::Document
- Inherits:
-
Object
- Object
- ZeusClient::V1::Document
- Defined in:
- lib/zeus/v1/client/models/multiplayer/document.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#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.
Constructor Details
#initialize(doc) ⇒ Document
Returns a new instance of Document.
5 6 7 8 9 10 |
# File 'lib/zeus/v1/client/models/multiplayer/document.rb', line 5 def initialize(doc) self.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/v1/client/models/multiplayer/document.rb', line 3 def created_at @created_at end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/zeus/v1/client/models/multiplayer/document.rb', line 3 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/zeus/v1/client/models/multiplayer/document.rb', line 3 def name @name end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
3 4 5 |
# File 'lib/zeus/v1/client/models/multiplayer/document.rb', line 3 def updated_at @updated_at end |
Instance Method Details
#as_json(options = {}) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/zeus/v1/client/models/multiplayer/document.rb', line 12 def as_json(={}) return { id: self.id, name: self.name, created_at: self.created_at, updated_at: self.updated_at } end |