Class: DataDomeSession
- Inherits:
-
Object
- Object
- DataDomeSession
- Defined in:
- lib/model/session.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
-
#initialize(id:, created_at: Time.now.iso8601) ⇒ DataDomeSession
constructor
A new instance of DataDomeSession.
- #to_json(options = {}) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(id:, created_at: Time.now.iso8601) ⇒ DataDomeSession
Returns a new instance of DataDomeSession.
8 9 10 11 |
# File 'lib/model/session.rb', line 8 def initialize(id:, created_at: Time.now.iso8601) @id = id @created_at = created_at end |
Instance Attribute Details
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
6 7 8 |
# File 'lib/model/session.rb', line 6 def created_at @created_at end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/model/session.rb', line 6 def id @id end |
Instance Method Details
#to_json(options = {}) ⇒ Object
17 18 19 20 21 22 |
# File 'lib/model/session.rb', line 17 def to_json( = {}) { id: id, createdAt: created_at, }.to_json end |
#to_s ⇒ Object
13 14 15 |
# File 'lib/model/session.rb', line 13 def to_s "DataDomeSession: id=#{@id}, createdAt =#{@created_at}" end |