Class: ObjectView::Label

Inherits:
Element
  • Object
show all
Defined in:
lib/object_view/input.rb

Instance Attribute Summary

Attributes inherited from Element

#acceptable_children, #children, #single_line, #tag

Instance Method Summary collapse

Methods inherited from Element

#<<, #add, #add_with_tag, #attr, #attributes, #css_class=, #find_element_with_tag, #id=, #is_acceptable_child?, #on_click=, #render, #render_attributes, #render_children, #style, #style=

Constructor Details

#initialize(content = nil) ⇒ Label

Returns a new instance of Label.



225
226
227
228
# File 'lib/object_view/input.rb', line 225

def initialize(content = nil)
  super(content)
  @tag = 'label'
end

Instance Method Details

#for=(value) ⇒ Object



230
231
232
# File 'lib/object_view/input.rb', line 230

def for=(value)
  attr('for', value)
end