Class: HolidaysRest::Subdivision
- Inherits:
-
Data
- Object
- Data
- HolidaysRest::Subdivision
- Defined in:
- lib/holidays_rest/models.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Class Method Summary collapse
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code
31 32 33 |
# File 'lib/holidays_rest/models.rb', line 31 def code @code end |
#name ⇒ Object (readonly)
Returns the value of attribute name
31 32 33 |
# File 'lib/holidays_rest/models.rb', line 31 def name @name end |
Class Method Details
.from_hash(h) ⇒ Object
32 33 34 |
# File 'lib/holidays_rest/models.rb', line 32 def self.from_hash(h) new(code: h.fetch("code", ""), name: h.fetch("name", "")) end |