Class: LibTAD::Places::LocationRef
- Inherits:
-
Object
- Object
- LibTAD::Places::LocationRef
- Defined in:
- lib/types/places/location_ref.rb
Overview
Information about a location referenced by a region.
Instance Attribute Summary collapse
-
#id ⇒ String
readonly
The ID of the location.
-
#name ⇒ String
readonly
The name of the location.
-
#state ⇒ State
readonly
The state of the location within the country (only if applicable).
Instance Method Summary collapse
-
#initialize(hash) ⇒ LocationRef
constructor
A new instance of LocationRef.
Constructor Details
#initialize(hash) ⇒ LocationRef
Returns a new instance of LocationRef.
17 18 19 20 21 |
# File 'lib/types/places/location_ref.rb', line 17 def initialize(hash) @id = hash.fetch('id', nil) @name = hash.fetch('name', nil) @state = hash.fetch('state', nil) end |
Instance Attribute Details
#id ⇒ String (readonly)
The ID of the location.
7 8 9 |
# File 'lib/types/places/location_ref.rb', line 7 def id @id end |
#name ⇒ String (readonly)
The name of the location.
11 12 13 |
# File 'lib/types/places/location_ref.rb', line 11 def name @name end |
#state ⇒ State (readonly)
The state of the location within the country (only if applicable).
15 16 17 |
# File 'lib/types/places/location_ref.rb', line 15 def state @state end |