Class: Gambiarra::Route
- Inherits:
-
Object
- Object
- Gambiarra::Route
- Defined in:
- lib/gambiarra/route.rb
Instance Attribute Summary collapse
-
#last ⇒ Object
readonly
Returns the value of attribute last.
-
#params ⇒ Object
Returns the value of attribute params.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#view ⇒ Object
readonly
Returns the value of attribute view.
Instance Method Summary collapse
-
#initialize(path, to:, with: {}) ⇒ Route
constructor
A new instance of Route.
- #respond(**other_params) ⇒ Object
Constructor Details
#initialize(path, to:, with: {}) ⇒ Route
Returns a new instance of Route.
6 7 8 9 10 |
# File 'lib/gambiarra/route.rb', line 6 def initialize(path, to:, with: {}) @path = path @view = to @params = with end |
Instance Attribute Details
#last ⇒ Object (readonly)
Returns the value of attribute last.
3 4 5 |
# File 'lib/gambiarra/route.rb', line 3 def last @last end |
#params ⇒ Object
Returns the value of attribute params.
4 5 6 |
# File 'lib/gambiarra/route.rb', line 4 def params @params end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
3 4 5 |
# File 'lib/gambiarra/route.rb', line 3 def path @path end |
#view ⇒ Object (readonly)
Returns the value of attribute view.
3 4 5 |
# File 'lib/gambiarra/route.rb', line 3 def view @view end |
Instance Method Details
#respond(**other_params) ⇒ Object
12 13 14 |
# File 'lib/gambiarra/route.rb', line 12 def respond(**other_params) view.respond(**params, **other_params) end |