Class: BlockHTML::Form::Element::Checkbox
- Inherits:
-
BlockHTML::Form::Element
- Object
- BlockHTML
- BlockHTML::Form::Element
- BlockHTML::Form::Element::Checkbox
- Defined in:
- lib/block-html/form.rb
Instance Attribute Summary
Attributes inherited from BlockHTML
Instance Method Summary collapse
-
#initialize(model, attrs) ⇒ Checkbox
constructor
A new instance of Checkbox.
Methods inherited from BlockHTML
#<<, #_p, #doctype, #each, #empty?, #escaped_text, #form, #method_missing, #p, #path, #render, #root, #tag, #text, #to_s, #xml
Constructor Details
#initialize(model, attrs) ⇒ Checkbox
Returns a new instance of Checkbox.
106 107 108 109 |
# File 'lib/block-html/form.rb', line 106 def initialize(model, attrs) super(model, attrs) tag(:input, @value ? @attrs.merge(:checked => '') : @attrs) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class BlockHTML