Class: ShouldaRouting::Resources::Base
- Inherits:
-
Object
- Object
- ShouldaRouting::Resources::Base
- 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
Constructor Details
#initialize(*args, &block) ⇒ Base
Returns a new instance of Base.
7 8 9 10 11 |
# File 'lib/shoulda_routing/resources/base.rb', line 7 def initialize *args, &block @options = args. @current = args @block = block end |
Instance Attribute Details
#block ⇒ Object
Returns the value of attribute block.
5 6 7 |
# File 'lib/shoulda_routing/resources/base.rb', line 5 def block @block end |
#current ⇒ Object
Returns the value of attribute current.
5 6 7 |
# File 'lib/shoulda_routing/resources/base.rb', line 5 def current @current end |
#options ⇒ Object
Returns the value of attribute options.
5 6 7 |
# File 'lib/shoulda_routing/resources/base.rb', line 5 def @options end |
Instance Method Details
#test! ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/shoulda_routing/resources/base.rb', line 13 def test! Routes::STACK.resources.push(current) Routes::STACK.routes.each do |route| specs_for(routeable_actions, route) specs_for(unrouteable_actions, route, :not_to) end DSL.instance_eval(&block) if block Routes::STACK.resources.pop end |