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