class Caracal::Core::Models::CustomPropertyModel

This class encapsulates the logic needed to store and manipulate custom properties

Attributes

custom_property_name[R]

accessors

custom_property_type[R]
custom_property_value[R]

Public Instance Methods

name(value) click to toggle source
SETTERS =============================
# File lib/caracal/core/models/custom_property_model.rb, line 26
def name(value)
  @custom_property_name = value.to_s
end
type(value) click to toggle source
# File lib/caracal/core/models/custom_property_model.rb, line 34
def type(value)
  @custom_property_type = value.to_s
end
valid?() click to toggle source
VALIDATION ===========================
# File lib/caracal/core/models/custom_property_model.rb, line 41
def valid?
  required = option_keys
  required.all? { |m| !send("custom_property_#{ m }").nil? }
end
value(value) click to toggle source
# File lib/caracal/core/models/custom_property_model.rb, line 30
def value(value)
  @custom_property_value = value.to_s
end

Private Instance Methods

option_keys() click to toggle source
# File lib/caracal/core/models/custom_property_model.rb, line 52
def option_keys
  [:name, :value, :type]
end