Class: SyoboiCalendar::Resources::BaseResource

Inherits:
Object
  • Object
show all
Defined in:
lib/syoboi_calendar/resources/base_resource.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source) ⇒ BaseResource


10
11
12
# File 'lib/syoboi_calendar/resources/base_resource.rb', line 10

def initialize(source)
  @source = source
end

Instance Attribute Details

#sourceHash (readonly)


7
8
9
# File 'lib/syoboi_calendar/resources/base_resource.rb', line 7

def source
  @source
end

Instance Method Details

#updated_atTime?


15
16
17
18
19
# File 'lib/syoboi_calendar/resources/base_resource.rb', line 15

def updated_at
  if source["LastUpdate"]
    ::Time.parse(source["LastUpdate"])
  end
end