Class: Thanos::Date

Inherits:
Object
  • Object
show all
Defined in:
lib/thanos/resources/date.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dateObject (readonly)

Returns the value of attribute date.



3
4
5
# File 'lib/thanos/resources/date.rb', line 3

def date
  @date
end

#typeObject (readonly)

Returns the value of attribute type.



3
4
5
# File 'lib/thanos/resources/date.rb', line 3

def type
  @type
end