Class: MQProxyRoute
- Inherits:
-
Object
- Object
- MQProxyRoute
- Defined in:
- lib/mqproxy.rb
Overview
Class to handle MapQuest directions request response
Instance Attribute Summary collapse
-
#directions ⇒ Object
Returns the value of attribute directions.
-
#distance ⇒ Object
Returns the value of attribute distance.
-
#raw ⇒ Object
Returns the value of attribute raw.
-
#time ⇒ Object
Returns the value of attribute time.
Instance Method Summary collapse
-
#initialize(route) ⇒ MQProxyRoute
constructor
Initialize MQProxyRoute and set standard data.
Constructor Details
#initialize(route) ⇒ MQProxyRoute
Initialize MQProxyRoute and set standard data
65 66 67 68 69 70 |
# File 'lib/mqproxy.rb', line 65 def initialize(route) @raw = route @time = extract_data('time') @distance = extract_data('distance') @directions = extract_data('legs') end |
Instance Attribute Details
#directions ⇒ Object
Returns the value of attribute directions.
62 63 64 |
# File 'lib/mqproxy.rb', line 62 def directions @directions end |
#distance ⇒ Object
Returns the value of attribute distance.
62 63 64 |
# File 'lib/mqproxy.rb', line 62 def distance @distance end |
#raw ⇒ Object
Returns the value of attribute raw.
62 63 64 |
# File 'lib/mqproxy.rb', line 62 def raw @raw end |
#time ⇒ Object
Returns the value of attribute time.
62 63 64 |
# File 'lib/mqproxy.rb', line 62 def time @time end |