Class: Ym4r::YahooMaps::BuildingBlock::Traffic::ResultSet

Inherits:
Array
  • Object
show all
Defined in:
lib/ym4r/yahoo_maps/building_block/traffic.rb

Overview

Contains a list of results from the Yahoo! Maps Traffic REST API

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(last_update_date, warning) ⇒ ResultSet



76
77
78
79
80
# File 'lib/ym4r/yahoo_maps/building_block/traffic.rb', line 76

def initialize(last_update_date,warning)
  super(0)
  @last_update_date = last_update_date
  @warning = warning
end

Instance Attribute Details

#last_update_dateObject

Returns the value of attribute last_update_date.



74
75
76
# File 'lib/ym4r/yahoo_maps/building_block/traffic.rb', line 74

def last_update_date
  @last_update_date
end

#warningObject

Returns the value of attribute warning.



74
75
76
# File 'lib/ym4r/yahoo_maps/building_block/traffic.rb', line 74

def warning
  @warning
end

Instance Method Details

#exact_match?Boolean

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



83
84
85
# File 'lib/ym4r/yahoo_maps/building_block/traffic.rb', line 83

def exact_match?
  warning.nil?
end