Class: Io::Flow::Reference::V0::Models::Continent

Inherits:
Object
  • Object
show all
Defined in:
lib/generated/continents.rb,
lib/flowcommerce-reference.rb

Overview

untill we define it in auto generator

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#codeObject

Returns the value of attribute code.



6
7
8
# File 'lib/generated/continents.rb', line 6

def code
  @code
end

#country_codesObject

Returns the value of attribute country_codes.



7
8
9
# File 'lib/generated/continents.rb', line 7

def country_codes
  @country_codes
end

#nameObject

Returns the value of attribute name.



5
6
7
# File 'lib/generated/continents.rb', line 5

def name
  @name
end

Instance Method Details

#countriesObject



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