Class: Ym4r::YahooMaps::BuildingBlock::Geocoding::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/ym4r/yahoo_maps/building_block/geocoding.rb

Overview

Contains a result match from the Yahoo! Maps geocoding service.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#addressObject

Returns the value of attribute address

Returns:

  • (Object)

    the current value of address



59
60
61
# File 'lib/ym4r/yahoo_maps/building_block/geocoding.rb', line 59

def address
  @address
end

#cityObject

Returns the value of attribute city

Returns:

  • (Object)

    the current value of city



59
60
61
# File 'lib/ym4r/yahoo_maps/building_block/geocoding.rb', line 59

def city
  @city
end

#countryObject

Returns the value of attribute country

Returns:

  • (Object)

    the current value of country



59
60
61
# File 'lib/ym4r/yahoo_maps/building_block/geocoding.rb', line 59

def country
  @country
end

#latitudeObject

Returns the value of attribute latitude

Returns:

  • (Object)

    the current value of latitude



59
60
61
# File 'lib/ym4r/yahoo_maps/building_block/geocoding.rb', line 59

def latitude
  @latitude
end

#longitudeObject

Returns the value of attribute longitude

Returns:

  • (Object)

    the current value of longitude



59
60
61
# File 'lib/ym4r/yahoo_maps/building_block/geocoding.rb', line 59

def longitude
  @longitude
end

#precisionObject

Returns the value of attribute precision

Returns:

  • (Object)

    the current value of precision



59
60
61
# File 'lib/ym4r/yahoo_maps/building_block/geocoding.rb', line 59

def precision
  @precision
end

#stateObject

Returns the value of attribute state

Returns:

  • (Object)

    the current value of state



59
60
61
# File 'lib/ym4r/yahoo_maps/building_block/geocoding.rb', line 59

def state
  @state
end

#warningObject

Returns the value of attribute warning

Returns:

  • (Object)

    the current value of warning



59
60
61
# File 'lib/ym4r/yahoo_maps/building_block/geocoding.rb', line 59

def warning
  @warning
end

#zipObject

Returns the value of attribute zip

Returns:

  • (Object)

    the current value of zip



59
60
61
# File 'lib/ym4r/yahoo_maps/building_block/geocoding.rb', line 59

def zip
  @zip
end

Instance Method Details

#exact_match?Boolean

Indicates if the location passed in the request could be exactly identified.

Returns:

  • (Boolean)


72
73
74
# File 'lib/ym4r/yahoo_maps/building_block/geocoding.rb', line 72

def exact_match?
  warning.nil?
end

#latlonObject

Convenience method for the lazy.



62
63
64
# File 'lib/ym4r/yahoo_maps/building_block/geocoding.rb', line 62

def latlon
  [latitude,longitude]
end

#lonlatObject

Convenience method for the lazy.



67
68
69
# File 'lib/ym4r/yahoo_maps/building_block/geocoding.rb', line 67

def lonlat
  [longitude,latitude]
end