Class: Aurita::GUI::Boolean_Field

Inherits:
Checkbox_Field show all
Defined in:
lib/aurita-gui/form/boolean_field.rb

Overview

Convenience configuration of Checkbox_Field. Renders one checkbox with :options => [1]

Instance Attribute Summary

Attributes inherited from Options_Field

#option_labels, #options, #options_range, #value

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 Checkbox_Field

#element, #option_elements

Methods inherited from Options_Field

#[], #[]=, #add_option, #content, #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) ⇒ Boolean_Field

Returns a new instance of Boolean_Field.



10
11
12
13
# File 'lib/aurita-gui/form/boolean_field.rb', line 10

def initialize(params, &block)
  params[:options] = [ 1 ]
  super(params, &block)
end

Dynamic Method Handling

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