Class: Saucy::ThroughAlias
- Inherits:
-
Object
- Object
- Saucy::ThroughAlias
- Defined in:
- lib/saucy/routing_extensions.rb
Instance Attribute Summary collapse
-
#route ⇒ Object
readonly
Returns the value of attribute route.
-
#through ⇒ Object
readonly
Returns the value of attribute through.
Instance Method Summary collapse
-
#initialize(route, through) ⇒ ThroughAlias
constructor
A new instance of ThroughAlias.
- #to_method(kind) ⇒ Object
Constructor Details
#initialize(route, through) ⇒ ThroughAlias
Returns a new instance of ThroughAlias.
20 21 22 23 |
# File 'lib/saucy/routing_extensions.rb', line 20 def initialize(route, through) @route = route @through = through end |
Instance Attribute Details
#route ⇒ Object (readonly)
Returns the value of attribute route.
18 19 20 |
# File 'lib/saucy/routing_extensions.rb', line 18 def route @route end |
#through ⇒ Object (readonly)
Returns the value of attribute through.
18 19 20 |
# File 'lib/saucy/routing_extensions.rb', line 18 def through @through end |
Instance Method Details
#to_method(kind) ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/saucy/routing_extensions.rb', line 25 def to_method(kind) return <<-RUBY def #{alias_name}_#{kind}(#{arguments.last}, options = {}) #{route_name}_#{kind}(#{arguments.join(', ')}, options) end RUBY end |