Class: ShouldaRouting::Resources::Base
- Inherits:
-
Object
- Object
- ShouldaRouting::Resources::Base
- Includes:
- ShouldaRouting::Routes::Helpers
- Defined in:
- lib/shoulda_routing/resources/base.rb
Instance Attribute Summary collapse
-
#block ⇒ Object
Returns the value of attribute block.
-
#current ⇒ Object
Returns the value of attribute current.
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(*args, &block) ⇒ Base
constructor
A new instance of Base.
- #test! ⇒ Object
Methods included from ShouldaRouting::Routes::Helpers
#route_params, #route_path, #route_permutations
Constructor Details
#initialize(*args, &block) ⇒ Base
Returns a new instance of Base.
8 9 10 11 12 |
# File 'lib/shoulda_routing/resources/base.rb', line 8 def initialize *args, &block @options = args. @current = args @block = block end |
Instance Attribute Details
#block ⇒ Object
Returns the value of attribute block.
6 7 8 |
# File 'lib/shoulda_routing/resources/base.rb', line 6 def block @block end |
#current ⇒ Object
Returns the value of attribute current.
6 7 8 |
# File 'lib/shoulda_routing/resources/base.rb', line 6 def current @current end |
#options ⇒ Object
Returns the value of attribute options.
6 7 8 |
# File 'lib/shoulda_routing/resources/base.rb', line 6 def @options end |
Instance Method Details
#test! ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/shoulda_routing/resources/base.rb', line 14 def test! Routes::STACK.push(current) route_permutations(Routes::STACK).each do |stack| specs_for(routeable_actions, stack) specs_for(unrouteable_actions, stack, :not_to) end DSL.instance_eval(&block) if block Routes::STACK.pop end |