Class: Aurita::GUI::Text_Field

Inherits:
Input_Field show all
Defined in:
lib/aurita-gui/form/text_field.rb

Overview

Wrapper for Input_Field, sets type to :text.

Usage:

i = Text_Field.new(:name => :description, 
                   :label => 'Description', 
                   :value => 'Lorem ipsum dolor')

Instance Attribute Summary

Attributes inherited from Form_Field

#form, #label, #type, #value

Attributes inherited from Element

#attrib, #content, #parent, #tag, #type

Instance Method Summary collapse

Methods inherited from Input_Field

#element

Methods inherited from Form_Field

#disable!, #editable!, #element, #enable!, #readonly!, #readonly?, #readonly_element, #to_s

Methods inherited from Element

#+, #[], #[]=, #clear_floating, #dom_id, #dom_id=, #each, #empty?, #id, #id=, #length, #method_missing, #string, #to_ary

Constructor Details

#initialize(params, &block) ⇒ Text_Field

Returns a new instance of Text_Field.



16
17
18
19
# File 'lib/aurita-gui/form/text_field.rb', line 16

def initialize(params, &block)
  params[:type] = :text unless params[:type]
  super(params)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Aurita::GUI::Element