Class: HtmlCom::Hidden
- Inherits:
-
InputElement
- Object
- Element
- InputElement
- HtmlCom::Hidden
- Defined in:
- lib/htmlcom.rb
Instance Method Summary collapse
-
#initialize(value = '', text: value, id: nil, label: nil) ⇒ Hidden
constructor
A new instance of Hidden.
Methods inherited from Element
#html_element, #to_doc, #to_html
Constructor Details
#initialize(value = '', text: value, id: nil, label: nil) ⇒ Hidden
Returns a new instance of Hidden.
454 455 456 457 458 459 460 461 |
# File 'lib/htmlcom.rb', line 454 def initialize(value='', text: value, id: nil, label: nil) @tag = 'hidden' @htmltag = 'input' @id = id super( [@htmltag, {type: 'hidden', value: text}]) end |