Class: HolidaysRest::Language
- Inherits:
-
Data
- Object
- Data
- HolidaysRest::Language
- 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
47 48 49 |
# File 'lib/holidays_rest/models.rb', line 47 def code @code end |
#name ⇒ Object (readonly)
Returns the value of attribute name
47 48 49 |
# File 'lib/holidays_rest/models.rb', line 47 def name @name end |
Class Method Details
.from_hash(h) ⇒ Object
48 49 50 |
# File 'lib/holidays_rest/models.rb', line 48 def self.from_hash(h) new(code: h.fetch("code", ""), name: h.fetch("name", "")) end |