Class: Gaigo::Countries
- Inherits:
-
Array
- Object
- Array
- Gaigo::Countries
- Defined in:
- lib/gaigo/countries.rb
Defined Under Namespace
Classes: Country
Instance Method Summary collapse
Instance Method Details
#add_country(attributes) ⇒ Object
20 21 22 |
# File 'lib/gaigo/countries.rb', line 20 def add_country(attributes) self << Country.new(*attributes) end |
#codes ⇒ Object
28 29 30 |
# File 'lib/gaigo/countries.rb', line 28 def codes self.map {|i| i.code} end |
#get(code) ⇒ Object
24 25 26 |
# File 'lib/gaigo/countries.rb', line 24 def get(code) self.find {|i| i.code == code.to_s} end |