Class: CtaTrack::Directions
- Inherits:
-
Object
- Object
- CtaTrack::Directions
- Defined in:
- lib/directions.rb
Instance Method Summary collapse
- #dir ⇒ Object
-
#initialize(args) ⇒ Directions
constructor
A new instance of Directions.
Constructor Details
#initialize(args) ⇒ Directions
Returns a new instance of Directions.
3 4 5 6 7 8 9 |
# File 'lib/directions.rb', line 3 def initialize(args) raise ArgumentError, "must enter api key" if API.apikey.nil? @result = [] API.directions(args).root.xpath("dir").each do |node| @result << node.text end end |
Instance Method Details
#dir ⇒ Object
10 11 12 |
# File 'lib/directions.rb', line 10 def dir @result end |