Module: Dill::DSL
- Defined in:
- lib/dill/dsl.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#document ⇒ 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
24 25 26 |
# File 'lib/dill/dsl.rb', line 24 def @widget_lookup_scope ||= end |
Instance Method Details
#document ⇒ Document
Returns the current document with the class of the current object set as the widget lookup scope.
7 8 9 |
# File 'lib/dill/dsl.rb', line 7 def document Document.new(widget_lookup_scope: ) end |
#has_widget?(name) ⇒ Boolean
Returns Whether one or more widgets exist in the current document.
13 14 15 |
# File 'lib/dill/dsl.rb', line 13 def (name) document.(name) end |
#widget(name, options = {}) ⇒ Object
Returns a widget instance for the given name.
20 21 22 |
# File 'lib/dill/dsl.rb', line 20 def (name, = {}) document.(name, ) end |