Class: RackStep::Route
- Inherits:
-
Object
- Object
- RackStep::Route
- Defined in:
- lib/route.rb
Instance Attribute Summary collapse
-
#controller ⇒ Object
Returns the value of attribute controller.
-
#path ⇒ Object
Returns the value of attribute path.
-
#verb ⇒ Object
Returns the value of attribute verb.
Instance Method Summary collapse
-
#id ⇒ Object
Unique id (String) of the route (verb + path).
-
#initialize(verb, path, controller) ⇒ Route
constructor
A new instance of Route.
Constructor Details
#initialize(verb, path, controller) ⇒ Route
Returns a new instance of Route.
11 12 13 14 15 |
# File 'lib/route.rb', line 11 def initialize(verb, path, controller) @verb = verb @path = path @controller = controller end |
Instance Attribute Details
#controller ⇒ Object
Returns the value of attribute controller.
9 10 11 |
# File 'lib/route.rb', line 9 def controller @controller end |
#path ⇒ Object
Returns the value of attribute path.
9 10 11 |
# File 'lib/route.rb', line 9 def path @path end |
#verb ⇒ Object
Returns the value of attribute verb.
9 10 11 |
# File 'lib/route.rb', line 9 def verb @verb end |
Instance Method Details
#id ⇒ Object
Unique id (String) of the route (verb + path). Eg: ‘GETuser’.
18 19 20 |
# File 'lib/route.rb', line 18 def id verb + path end |