Class: RailsEdgeTest::Dsl::Action
- Inherits:
-
Struct
- Object
- Struct
- RailsEdgeTest::Dsl::Action
- Defined in:
- lib/rails_edge_test/dsl/action.rb
Instance Attribute Summary collapse
-
#controller_class ⇒ Object
Returns the value of attribute controller_class.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #__edges ⇒ Object
- #__let_handler ⇒ Object
- #edge(description, &block) ⇒ Object
- #generate(title, &block) ⇒ Object
-
#initialize(*args) ⇒ Action
constructor
A new instance of Action.
- #let(title, &block) ⇒ Object
Constructor Details
#initialize(*args) ⇒ Action
Returns a new instance of Action.
3 4 5 6 7 |
# File 'lib/rails_edge_test/dsl/action.rb', line 3 def initialize(*args) super @edges = {} @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/action.rb', line 2 def controller_class @controller_class end |
#name ⇒ Object
Returns the value of attribute name
2 3 4 |
# File 'lib/rails_edge_test/dsl/action.rb', line 2 def name @name end |
Instance Method Details
#__edges ⇒ Object
22 23 24 |
# File 'lib/rails_edge_test/dsl/action.rb', line 22 def __edges @edges end |
#__let_handler ⇒ Object
26 27 28 |
# File 'lib/rails_edge_test/dsl/action.rb', line 26 def __let_handler @let_handler end |
#edge(description, &block) ⇒ Object
9 10 11 12 |
# File 'lib/rails_edge_test/dsl/action.rb', line 9 def edge(description, &block) edge = Edge.new(description, name, controller_class) @edges[edge] = block end |
#generate(title, &block) ⇒ Object
18 19 20 |
# File 'lib/rails_edge_test/dsl/action.rb', line 18 def generate(title, &block) @let_handler.add_definition("generate_#{title}", &block) end |
#let(title, &block) ⇒ Object
14 15 16 |
# File 'lib/rails_edge_test/dsl/action.rb', line 14 def let(title, &block) @let_handler.add_definition(title, &block) end |