Class: LibTAD::Places::LocationRef

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

Overview

Information about a location referenced by a region.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#idString (readonly)

The ID of the location.

Returns:

  • (String)


7
8
9
# File 'lib/types/places/location_ref.rb', line 7

def id
  @id
end

#nameString (readonly)

The name of the location.

Returns:

  • (String)


11
12
13
# File 'lib/types/places/location_ref.rb', line 11

def name
  @name
end

#stateState (readonly)

The state of the location within the country (only if applicable).

Returns:

  • (State)


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

def state
  @state
end