Module: CustomFields::Types::Color::Target::ClassMethods
- Defined in:
- lib/custom_fields/types/color.rb
Instance Method Summary collapse
-
#apply_color_custom_field(klass, rule) ⇒ Object
Add a color field.
-
#color_attribute_get(instance, name) ⇒ Hash
Build a hash storing the raw value for a color custom field of an instance.
-
#color_attribute_set(instance, name, attributes) ⇒ Object
Set the value for the instance and the color field specified by the 2 params.
Instance Method Details
#apply_color_custom_field(klass, rule) ⇒ Object
Add a color field
20 21 22 |
# File 'lib/custom_fields/types/color.rb', line 20 def apply_color_custom_field(klass, rule) apply_custom_field(klass, rule) end |
#color_attribute_get(instance, name) ⇒ Hash
Build a hash storing the raw value for a color custom field of an instance.
32 33 34 |
# File 'lib/custom_fields/types/color.rb', line 32 def color_attribute_get(instance, name) self.default_attribute_get(instance, name) end |
#color_attribute_set(instance, name, attributes) ⇒ Object
Set the value for the instance and the color field specified by the 2 params.
43 44 45 |
# File 'lib/custom_fields/types/color.rb', line 43 def color_attribute_set(instance, name, attributes) self.default_attribute_set(instance, name, attributes) end |