Class: Parsec::City

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

Constant Summary

Constants inherited from Base

Base::DATE_FORMAT

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code:, name: nil, country_iso: nil) ⇒ City

Returns a new instance of City.



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

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

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



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

def code
  @code
end

#country_isoObject (readonly)

Returns the value of attribute country_iso.



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

def country_iso
  @country_iso
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end