Class: HtmlCom::Text
- Inherits:
-
InputElement
- Object
- Element
- InputElement
- HtmlCom::Text
- Defined in:
- lib/htmlcom.rb
Instance Method Summary collapse
-
#initialize(value = '', text: value, label: nil, id: nil) ⇒ Text
constructor
A new instance of Text.
Methods inherited from Element
#html_element, #to_doc, #to_html
Constructor Details
#initialize(value = '', text: value, label: nil, id: nil) ⇒ Text
Returns a new instance of Text.
444 445 446 447 448 449 450 451 452 |
# File 'lib/htmlcom.rb', line 444 def initialize(value='', text: value, label: nil, id: nil) @tag = 'text' @htmltag = 'input' @id = id @label = label super( [@htmltag, {type: 'text', value: text}]) puts 'Text: after super' end |