Class: RailsEdgeTest::Dsl::Controller
- Inherits:
-
Struct
- Object
- Struct
- RailsEdgeTest::Dsl::Controller
- Defined in:
- lib/rails_edge_test/dsl/controller.rb
Instance Attribute Summary collapse
-
#controller_class ⇒ Object
Returns the value of attribute controller_class.
Instance Method Summary collapse
- #__actions ⇒ Object
- #__let_handler ⇒ Object
- #action(name, &block) ⇒ Object
-
#initialize(*args) ⇒ Controller
constructor
A new instance of Controller.
- #let(title, &block) ⇒ Object
Constructor Details
#initialize(*args) ⇒ Controller
Returns a new instance of Controller.
3 4 5 6 7 |
# File 'lib/rails_edge_test/dsl/controller.rb', line 3 def initialize(*args) super @actions = [] @let_handler = LetHandler.new end |
Instance Attribute Details
#controller_class ⇒ Object
Returns the value of attribute controller_class
2 3 4 |
# File 'lib/rails_edge_test/dsl/controller.rb', line 2 def controller_class @controller_class end |
Instance Method Details
#__actions ⇒ Object
19 20 21 |
# File 'lib/rails_edge_test/dsl/controller.rb', line 19 def __actions @actions end |
#__let_handler ⇒ Object
23 24 25 |
# File 'lib/rails_edge_test/dsl/controller.rb', line 23 def __let_handler @let_handler end |
#action(name, &block) ⇒ Object
9 10 11 12 13 |
# File 'lib/rails_edge_test/dsl/controller.rb', line 9 def action(name, &block) new_action = Action.new(name, self) new_action.instance_exec(&block) @actions << new_action end |
#let(title, &block) ⇒ Object
15 16 17 |
# File 'lib/rails_edge_test/dsl/controller.rb', line 15 def let(title, &block) @let_handler.add_definition(title, &block) end |