Class: Parsec::Country

Inherits:
Base
  • Object
show all
Defined in:
lib/parsec/country.rb

Constant Summary

Constants inherited from Base

Base::DATE_FORMAT

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(iso:, name: nil, code: nil) ⇒ Country

Returns a new instance of Country.



7
8
9
10
11
# File 'lib/parsec/country.rb', line 7

def initialize(iso:, name: nil, code: nil)
  @code = code
  @name = name
  @iso = iso
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



5
6
7
# File 'lib/parsec/country.rb', line 5

def code
  @code
end

#isoObject (readonly)

Returns the value of attribute iso.



5
6
7
# File 'lib/parsec/country.rb', line 5

def iso
  @iso
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/parsec/country.rb', line 5

def name
  @name
end