Module: Formular::Element::Modules::Container::InstanceMethods
- Defined in:
- lib/formular/element/modules/container.rb
Instance Method Summary collapse
- #content ⇒ Object
- #end ⇒ Object
- #has_content? ⇒ Boolean
-
#method_missing(method, *args, &block) ⇒ Object
- Delegate missing methods to the builder TODO
-
@apotonick is going to do something fancy here to delegate the builder methods rather then using this method missing.
- #start ⇒ Object
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
Delegate missing methods to the builder
- TODO
-
@apotonick is going to do something fancy here to delegate
the builder methods rather then using this method missing.
51 52 53 54 55 |
# File 'lib/formular/element/modules/container.rb', line 51 def method_missing(method, *args, &block) return super unless builder builder.send(method, *args, &block) end |
Instance Method Details
#content ⇒ Object
32 33 34 |
# File 'lib/formular/element/modules/container.rb', line 32 def content @block ? HtmlBlock.new(self, @block).call : [:content].to_s end |
#end ⇒ Object
40 41 42 |
# File 'lib/formular/element/modules/container.rb', line 40 def end to_html(context: :end) end |
#has_content? ⇒ Boolean
36 37 38 |
# File 'lib/formular/element/modules/container.rb', line 36 def has_content? @block || [:content] end |
#start ⇒ Object
44 45 46 |
# File 'lib/formular/element/modules/container.rb', line 44 def start to_html(context: :start) end |