Class: OperaWatir::Selector::BlockBuilder
- Defined in:
- lib/operawatir/selector.rb
Instance Attribute Summary collapse
-
#items ⇒ Object
Returns the value of attribute items.
-
#selector ⇒ Object
Returns the value of attribute selector.
Instance Method Summary collapse
-
#initialize(selector) ⇒ BlockBuilder
constructor
A new instance of BlockBuilder.
- #method_missing(*args, &blk) ⇒ Object
Constructor Details
#initialize(selector) ⇒ BlockBuilder
Returns a new instance of BlockBuilder.
100 101 102 |
# File 'lib/operawatir/selector.rb', line 100 def initialize(selector) self.selector, self.items = selector, [] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args, &blk) ⇒ Object
104 105 106 107 108 |
# File 'lib/operawatir/selector.rb', line 104 def method_missing(*args, &blk) OperaWatir::Selector.new(selector.collection, selector.sexp).send(*args, &blk).tap do |s| items << s end end |