Class: HolidaysRest::HolidayDay

Inherits:
Data
  • Object
show all
Defined in:
lib/holidays_rest/models.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#actualObject (readonly)

Returns the value of attribute actual

Returns:

  • (Object)

    the current value of actual



2
3
4
# File 'lib/holidays_rest/models.rb', line 2

def actual
  @actual
end

#observedObject (readonly)

Returns the value of attribute observed

Returns:

  • (Object)

    the current value of observed



2
3
4
# File 'lib/holidays_rest/models.rb', line 2

def observed
  @observed
end

Class Method Details

.from_hash(h) ⇒ Object



3
4
5
6
7
8
# File 'lib/holidays_rest/models.rb', line 3

def self.from_hash(h)
  new(
    actual:   h.fetch("actual", ""),
    observed: h.fetch("observed", "")
  )
end