Class: Io::Flow::Reference::V0::Models::Continent
- Inherits:
-
Object
- Object
- Io::Flow::Reference::V0::Models::Continent
- Defined in:
- lib/generated/continents.rb,
lib/flowcommerce-reference.rb
Overview
untill we define it in auto generator
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#country_codes ⇒ Object
Returns the value of attribute country_codes.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #countries ⇒ Object
-
#initialize(name:, code:, countries:) ⇒ Continent
constructor
A new instance of Continent.
Constructor Details
#initialize(name:, code:, countries:) ⇒ Continent
Returns a new instance of Continent.
9 10 11 12 13 |
# File 'lib/generated/continents.rb', line 9 def initialize(name:, code:, countries:) @name = name @code = code @country_codes = countries end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
6 7 8 |
# File 'lib/generated/continents.rb', line 6 def code @code end |
#country_codes ⇒ Object
Returns the value of attribute country_codes.
7 8 9 |
# File 'lib/generated/continents.rb', line 7 def country_codes @country_codes end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/generated/continents.rb', line 5 def name @name end |
Instance Method Details
#countries ⇒ Object
15 16 17 18 19 |
# File 'lib/generated/continents.rb', line 15 def countries @country_codes.map do |country| FlowCommerce::Reference::Countries.find(country) end end |