Class: Thanos::Date
- Inherits:
-
Object
- Object
- Thanos::Date
- Defined in:
- lib/thanos/resources/date.rb
Instance Attribute Summary collapse
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(data) ⇒ Date
constructor
A new instance of Date.
Constructor Details
#initialize(data) ⇒ Date
Returns a new instance of Date.
5 6 7 8 |
# File 'lib/thanos/resources/date.rb', line 5 def initialize(data) @type = data['type'] @date = ::Date.parse(data['date']) end |
Instance Attribute Details
#date ⇒ Object (readonly)
Returns the value of attribute date.
3 4 5 |
# File 'lib/thanos/resources/date.rb', line 3 def date @date end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
3 4 5 |
# File 'lib/thanos/resources/date.rb', line 3 def type @type end |