Class: Bus
- Inherits:
-
Object
- Object
- Bus
- Defined in:
- lib/bubus/bus.rb
Instance Attribute Summary collapse
-
#call_name ⇒ Object
Returns the value of attribute call_name.
-
#coordinates ⇒ Object
Returns the value of attribute coordinates.
-
#general_heading ⇒ Object
Returns the value of attribute general_heading.
-
#id ⇒ Object
Returns the value of attribute id.
-
#lat ⇒ Object
Returns the value of attribute lat.
-
#lng ⇒ Object
Returns the value of attribute lng.
-
#speed ⇒ Object
Returns the value of attribute speed.
Instance Method Summary collapse
-
#initialize(bus_hash) ⇒ Bus
constructor
A new instance of Bus.
Constructor Details
#initialize(bus_hash) ⇒ Bus
Returns a new instance of Bus.
4 5 6 7 8 9 10 11 12 |
# File 'lib/bubus/bus.rb', line 4 def initialize(bus_hash) @call_name = bus_hash["call_name"] @coordinates = bus_hash["coordinates"] @general_heading = bus_hash["general_heading"] @id = bus_hash["id"] @speed = bus_hash["speed"] @lat = bus_hash["lat"] @lng = bus_hash["lng"] end |
Instance Attribute Details
#call_name ⇒ Object
Returns the value of attribute call_name.
2 3 4 |
# File 'lib/bubus/bus.rb', line 2 def call_name @call_name end |
#coordinates ⇒ Object
Returns the value of attribute coordinates.
2 3 4 |
# File 'lib/bubus/bus.rb', line 2 def coordinates @coordinates end |
#general_heading ⇒ Object
Returns the value of attribute general_heading.
2 3 4 |
# File 'lib/bubus/bus.rb', line 2 def general_heading @general_heading end |
#id ⇒ Object
Returns the value of attribute id.
2 3 4 |
# File 'lib/bubus/bus.rb', line 2 def id @id end |
#lat ⇒ Object
Returns the value of attribute lat.
2 3 4 |
# File 'lib/bubus/bus.rb', line 2 def lat @lat end |
#lng ⇒ Object
Returns the value of attribute lng.
2 3 4 |
# File 'lib/bubus/bus.rb', line 2 def lng @lng end |
#speed ⇒ Object
Returns the value of attribute speed.
2 3 4 |
# File 'lib/bubus/bus.rb', line 2 def speed @speed end |