Class: PureForm::Attribute
- Inherits:
-
Object
- Object
- PureForm::Attribute
- Defined in:
- lib/pure_form/attribute.rb
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#value_type ⇒ Object
readonly
Returns the value of attribute value_type.
Instance Method Summary collapse
- #define ⇒ Object
-
#initialize(context, name, options) ⇒ Attribute
constructor
A new instance of Attribute.
Constructor Details
#initialize(context, name, options) ⇒ Attribute
Returns a new instance of Attribute.
5 6 7 8 |
# File 'lib/pure_form/attribute.rb', line 5 def initialize(context, name, ) @context, @name, = context, name.to_s, @value_type = build_value_type end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
3 4 5 |
# File 'lib/pure_form/attribute.rb', line 3 def context @context end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/pure_form/attribute.rb', line 3 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
3 4 5 |
# File 'lib/pure_form/attribute.rb', line 3 def end |
#value_type ⇒ Object (readonly)
Returns the value of attribute value_type.
3 4 5 |
# File 'lib/pure_form/attribute.rb', line 3 def value_type @value_type end |
Instance Method Details
#define ⇒ Object
10 11 12 13 14 15 |
# File 'lib/pure_form/attribute.rb', line 10 def define define_setter define_complex_setter define_getter define_predicate end |