Class: LibTAD::Places::Country

Inherits:
Object
  • Object
show all
Defined in:
lib/types/places/country.rb

Overview

Information about a country.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Country

Returns a new instance of Country.



14
15
16
17
# File 'lib/types/places/country.rb', line 14

def initialize(hash)
  @id = hash.fetch('id', nil)
  @name = hash.fetch('name', nil)
end

Instance Attribute Details

#idString (readonly)

The ISO 3166-1-alpha-2 country code.

Returns:

  • (String)

See Also:



8
9
10
# File 'lib/types/places/country.rb', line 8

def id
  @id
end

#nameString (readonly)

Full name of the country.

Returns:

  • (String)


12
13
14
# File 'lib/types/places/country.rb', line 12

def name
  @name
end