Class: HtmlCom::InputElement
Instance Method Summary collapse
-
#initialize(rawobj) ⇒ InputElement
constructor
A new instance of InputElement.
Methods inherited from Element
#build, #html_element, #to_doc
Constructor Details
#initialize(rawobj) ⇒ InputElement
366 367 368 369 370 371 372 373 374 375 376 377 378 |
# File 'lib/htmlcom.rb', line 366 def initialize(rawobj) if @label then obj = [{label: @label}, rawobj] super({@tag.to_sym => obj}) @doc.root.element(@tag + '/label').attributes[:for] = @id else super({@tag.to_sym => rawobj}) end end |