Module: Cucumber::Salad::DSL
- Defined in:
- lib/cucumber/salad/dsl.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#document ⇒ Widgets::Document
The current document with the class of the current object set as the widget lookup scope.
-
#has_widget?(name) ⇒ Boolean
Whether one or more widgets exist in the current document.
-
#widget(name, options = {}) ⇒ Object
Returns a widget instance for the given name.
Instance Attribute Details
#widget_lookup_scope ⇒ Object
25 26 27 |
# File 'lib/cucumber/salad/dsl.rb', line 25 def @widget_lookup_scope ||= end |
Instance Method Details
#document ⇒ Widgets::Document
Returns the current document with the class of the current object set as the widget lookup scope.
8 9 10 |
# File 'lib/cucumber/salad/dsl.rb', line 8 def document Widgets::Document.new(widget_lookup_scope: ) end |
#has_widget?(name) ⇒ Boolean
Returns Whether one or more widgets exist in the current document.
14 15 16 |
# File 'lib/cucumber/salad/dsl.rb', line 14 def (name) document.(name) end |
#widget(name, options = {}) ⇒ Object
Returns a widget instance for the given name.
21 22 23 |
# File 'lib/cucumber/salad/dsl.rb', line 21 def (name, = {}) document.(name, ) end |