Class: HtmlCom::Text

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, 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