Class: SeleniumRecord::ActionBuilder::Builder
- Inherits:
-
Object
- Object
- SeleniumRecord::ActionBuilder::Builder
- Defined in:
- lib/selenium_record/action_builder.rb
Overview
Class for building complex actions
Instance Attribute Summary collapse
-
#actions ⇒ Object
Returns the value of attribute actions.
Instance Method Summary collapse
-
#initialize(&block) ⇒ Builder
constructor
A new instance of Builder.
- #method_missing(method, *args) ⇒ Object
- #perform ⇒ Object
Constructor Details
#initialize(&block) ⇒ Builder
Returns a new instance of Builder.
17 18 19 20 |
# File 'lib/selenium_record/action_builder.rb', line 17 def initialize(&block) @actions = [] @blk = block end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
Instance Attribute Details
#actions ⇒ Object
Returns the value of attribute actions.
15 16 17 |
# File 'lib/selenium_record/action_builder.rb', line 15 def actions @actions end |
Instance Method Details
#perform ⇒ Object
22 23 24 25 |
# File 'lib/selenium_record/action_builder.rb', line 22 def perform @actions.each { |action| @blk.call(action.method, action.args) } @actions.freeze end |