Class: HtmlCom::Hidden

Inherits:
InputElement show all
Defined in:
lib/htmlcom.rb

Instance Method Summary collapse

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