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
62 63 64 65 66 67 |
# File 'lib/mqproxy.rb', line 62 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.
59 60 61 |
# File 'lib/mqproxy.rb', line 59 def directions @directions end |
#distance ⇒ Object
Returns the value of attribute distance.
59 60 61 |
# File 'lib/mqproxy.rb', line 59 def distance @distance end |
#raw ⇒ Object
Returns the value of attribute raw.
59 60 61 |
# File 'lib/mqproxy.rb', line 59 def raw @raw end |
#time ⇒ Object
Returns the value of attribute time.
59 60 61 |
# File 'lib/mqproxy.rb', line 59 def time @time end |