Class: Dto::State
- Inherits:
-
Object
- Object
- Dto::State
- Defined in:
- lib/dto/state.rb
Instance Attribute Summary collapse
-
#last_timestamp ⇒ Object
Returns the value of attribute last_timestamp.
Instance Method Summary collapse
-
#initialize(last_timestamp = nil) ⇒ State
constructor
A new instance of State.
-
#to_hash ⇒ Object
make sure all values are strings.
Constructor Details
#initialize(last_timestamp = nil) ⇒ State
Returns a new instance of State.
8 9 10 |
# File 'lib/dto/state.rb', line 8 def initialize( = nil) @last_timestamp = unless .nil? end |
Instance Attribute Details
#last_timestamp ⇒ Object
Returns the value of attribute last_timestamp.
6 7 8 |
# File 'lib/dto/state.rb', line 6 def @last_timestamp end |
Instance Method Details
#to_hash ⇒ Object
make sure all values are strings
13 14 15 16 17 |
# File 'lib/dto/state.rb', line 13 def to_hash { last_timestamp: @last_timestamp.to_s }.compact end |