module Cucumber::Salad::DSL
Attributes
widget_lookup_scope[W]
Public Instance Methods
document()
click to toggle source
@return [Widgets::Document] the current document with the class of the
current object set as the widget lookup scope.
# File lib/cucumber/salad/dsl.rb, line 8 def document Widgets::Document.new(widget_lookup_scope: widget_lookup_scope) end
has_widget?(name)
click to toggle source
@return [Boolean] Whether one or more widgets exist in the current
document.
# File lib/cucumber/salad/dsl.rb, line 14 def has_widget?(name) document.has_widget?(name) end
widget(name, options = {})
click to toggle source
Returns a widget instance for the given name.
@param name [String, Symbol]
# File lib/cucumber/salad/dsl.rb, line 21 def widget(name, options = {}) document.widget(name, options) end
widget_lookup_scope()
click to toggle source
# File lib/cucumber/salad/dsl.rb, line 25 def widget_lookup_scope @widget_lookup_scope ||= default_widget_lookup_scope end
Private Instance Methods
default_widget_lookup_scope()
click to toggle source
# File lib/cucumber/salad/dsl.rb, line 31 def default_widget_lookup_scope Module === self ? self : self.class end