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
17 18 19 |
# File 'lib/custom_fields/types/color.rb', line 17 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.
29 30 31 |
# File 'lib/custom_fields/types/color.rb', line 29 def color_attribute_get(instance, name) 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.
40 41 42 |
# File 'lib/custom_fields/types/color.rb', line 40 def color_attribute_set(instance, name, attributes) default_attribute_set(instance, name, attributes) end |