Class: SpBus::Route
- Inherits:
-
Object
- Object
- SpBus::Route
- Defined in:
- lib/spbus/route.rb
Instance Attribute Summary collapse
-
#destination ⇒ Object
Returns the value of attribute destination.
-
#destination_id ⇒ Object
Returns the value of attribute destination_id.
-
#number ⇒ Object
Returns the value of attribute number.
-
#one_way ⇒ Object
writeonly
Sets the attribute one_way.
-
#origin ⇒ Object
Returns the value of attribute origin.
-
#origin_id ⇒ Object
Returns the value of attribute origin_id.
Instance Method Summary collapse
-
#initialize(number) ⇒ Route
constructor
A new instance of Route.
- #one_way? ⇒ Boolean
Constructor Details
#initialize(number) ⇒ Route
Returns a new instance of Route.
7 8 9 |
# File 'lib/spbus/route.rb', line 7 def initialize(number) @number = number end |
Instance Attribute Details
#destination ⇒ Object
Returns the value of attribute destination.
4 5 6 |
# File 'lib/spbus/route.rb', line 4 def destination @destination end |
#destination_id ⇒ Object
Returns the value of attribute destination_id.
4 5 6 |
# File 'lib/spbus/route.rb', line 4 def destination_id @destination_id end |
#number ⇒ Object
Returns the value of attribute number.
4 5 6 |
# File 'lib/spbus/route.rb', line 4 def number @number end |
#one_way=(value) ⇒ Object (writeonly)
Sets the attribute one_way
5 6 7 |
# File 'lib/spbus/route.rb', line 5 def one_way=(value) @one_way = value end |
#origin ⇒ Object
Returns the value of attribute origin.
4 5 6 |
# File 'lib/spbus/route.rb', line 4 def origin @origin end |
#origin_id ⇒ Object
Returns the value of attribute origin_id.
4 5 6 |
# File 'lib/spbus/route.rb', line 4 def origin_id @origin_id end |
Instance Method Details
#one_way? ⇒ Boolean
11 12 13 |
# File 'lib/spbus/route.rb', line 11 def one_way? !!@one_way end |