Class: Caisson::Helpers::Form::Builder::Field::Base
- Inherits:
-
Object
- Object
- Caisson::Helpers::Form::Builder::Field::Base
- Defined in:
- lib/caisson/helpers/form/builder/field/base.rb
Defined Under Namespace
Classes: OptionParser
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(core, record, name, options = {}) ⇒ Base
constructor
************************************************************************************* CONSTRUCTOR *************************************************************************************.
Constructor Details
#initialize(core, record, name, options = {}) ⇒ Base
************************************************************************************* CONSTRUCTOR *************************************************************************************
11 12 13 14 15 16 17 |
# File 'lib/caisson/helpers/form/builder/field/base.rb', line 11 def initialize(core, record, name, ={}) @core = core @record = record @name = name @options = OptionParser.new(@record, @name, ).parse end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args, &block) ⇒ Object (private)
69 70 71 72 73 74 75 |
# File 'lib/caisson/helpers/form/builder/field/base.rb', line 69 def method_missing(*args, &block) if [:check_box, :content_tag].include?(args.first) return @core.send(*args, &block) else raise NoMethodError.new("undefined local variable or method '#{args.first}' for #{self.class}") end end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/caisson/helpers/form/builder/field/base.rb', line 6 def name @name end |