Class: Aurita::GUI::Form_Field_Wrapper
- Defined in:
- lib/aurita-gui/form.rb
Instance Attribute Summary collapse
-
#field ⇒ Object
Returns the value of attribute field.
Attributes inherited from Element
#attrib, #content, #parent, #tag, #type
Instance Method Summary collapse
-
#initialize(field) ⇒ Form_Field_Wrapper
constructor
A new instance of Form_Field_Wrapper.
Methods inherited from Element
#+, #[], #[]=, #clear_floating, #dom_id, #dom_id=, #each, #empty?, #id, #id=, #length, #method_missing, #string, #to_ary
Constructor Details
#initialize(field) ⇒ Form_Field_Wrapper
Returns a new instance of Form_Field_Wrapper.
28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/aurita-gui/form.rb', line 28 def initialize(field) label_params = { :for => field.dom_id } label_params[:id] = field.dom_id.to_s + '_label' label = field.label @content = [ HTML.label(label_params) { label }, field ] params = { :tag => :li, :content => @content, :id => field.dom_id + '_wrap', :class => field.class.to_s.split('::')[-1].downcase + '_wrap form_field' } super(params) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Aurita::GUI::Element
Instance Attribute Details
#field ⇒ Object
Returns the value of attribute field.
26 27 28 |
# File 'lib/aurita-gui/form.rb', line 26 def field @field end |