Class: TollBooth::RouteCollection
- Inherits:
-
Array
- Object
- Array
- TollBooth::RouteCollection
- Defined in:
- lib/toll_booth/route_collection.rb
Overview
a collection of routes received from google after requesting directions if an error occurs, the collection will be empty and the errors attribute will be populated
Instance Attribute Summary collapse
-
#errors ⇒ Object
Returns the value of attribute errors.
Instance Method Summary collapse
-
#found? ⇒ Boolean
where routes found?.
-
#initialize(size = 0, obj = nil) ⇒ RouteCollection
constructor
A new instance of RouteCollection.
Constructor Details
#initialize(size = 0, obj = nil) ⇒ RouteCollection
Returns a new instance of RouteCollection.
7 8 9 10 |
# File 'lib/toll_booth/route_collection.rb', line 7 def initialize(size = 0, obj = nil) super @errors = [] end |
Instance Attribute Details
#errors ⇒ Object
Returns the value of attribute errors.
6 7 8 |
# File 'lib/toll_booth/route_collection.rb', line 6 def errors @errors end |
Instance Method Details
#found? ⇒ Boolean
where routes found?
14 15 16 |
# File 'lib/toll_booth/route_collection.rb', line 14 def found? empty? end |