Class: PowersDemo::Route
- Inherits:
-
Object
- Object
- PowersDemo::Route
- Defined in:
- lib/modules/topics/demos/powers_demo.rb
Instance Attribute Summary collapse
-
#distance ⇒ Object
readonly
Returns the value of attribute distance.
Instance Method Summary collapse
-
#initialize(start_location, finish_location) ⇒ Route
constructor
A new instance of Route.
Constructor Details
permalink #initialize(start_location, finish_location) ⇒ Route
Returns a new instance of Route.
44 45 46 47 |
# File 'lib/modules/topics/demos/powers_demo.rb', line 44 def initialize(start_location, finish_location) @start_location = start_location @finish_location = finish_location end |
Instance Attribute Details
permalink #distance ⇒ Object (readonly)
Returns the value of attribute distance.
42 43 44 |
# File 'lib/modules/topics/demos/powers_demo.rb', line 42 def distance @distance end |