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.
25 26 27 28 |
# File 'lib/saucy/routing_extensions.rb', line 25 def initialize(route, through) @route = route @through = through end |
Instance Attribute Details
#route ⇒ Object (readonly)
Returns the value of attribute route.
23 24 25 |
# File 'lib/saucy/routing_extensions.rb', line 23 def route @route end |
#through ⇒ Object (readonly)
Returns the value of attribute through.
23 24 25 |
# File 'lib/saucy/routing_extensions.rb', line 23 def through @through end |
Instance Method Details
#to_method(kind) ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/saucy/routing_extensions.rb', line 30 def to_method(kind) return <<-RUBY def #{alias_name}_#{kind}(#{arguments.last}, options = {}) #{route_name}_#{kind}(#{arguments.join(', ')}, options) end RUBY end |