Module: Dominate
- Extended by:
- Dominate
- Included in:
- Dominate
- Defined in:
- lib/dominate.rb,
lib/dominate/dom.rb,
lib/dominate/html.rb,
lib/dominate/scope.rb,
lib/dominate/widget.rb,
lib/dominate/version.rb,
lib/dominate/instance.rb,
lib/dominate/widget/event.rb,
lib/dominate/widget/helper.rb,
lib/dominate/widget/middleware.rb
Defined Under Namespace
Modules: HTML Classes: Dom, Instance, NoFileFound, Scope, Widget
Constant Summary collapse
- VERSION =
"0.7.2"
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
-
#reset_config ⇒ Object
Returns the value of attribute reset_config.
Instance Method Summary collapse
- #HTML(html, instance = false, options = {}) ⇒ Object
-
#reset_config! ⇒ Object
Resets the configuration to the default (empty hash).
- #setup {|config| ... } ⇒ Object
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
18 19 20 |
# File 'lib/dominate.rb', line 18 def config @config end |
#reset_config ⇒ Object
Returns the value of attribute reset_config.
18 19 20 |
# File 'lib/dominate.rb', line 18 def reset_config @reset_config end |
Instance Method Details
#HTML(html, instance = false, options = {}) ⇒ Object
39 40 41 |
# File 'lib/dominate.rb', line 39 def HTML html, instance = false, = {} Dom.new html, instance, end |
#reset_config! ⇒ Object
Resets the configuration to the default (empty hash)
29 30 31 32 33 34 35 36 37 |
# File 'lib/dominate.rb', line 29 def reset_config! @config = OpenStruct.new({ view_path: './views', layout: 'app', widget_path: './widgets', widget_url: '/widgets', widgets: {} }) end |
#setup {|config| ... } ⇒ Object
20 21 22 |
# File 'lib/dominate.rb', line 20 def setup yield config end |