Method: ActiveConfiguration::Option#modifiers

Defined in:
lib/active_configuration/option.rb

#modifiers(*values) ⇒ Object

Restricts the allows modifiers of this option to a given list of modifers.

Example:

modifiers 'eq', 'lt', 'gt', 'lte', 'gte'

Parameters:

  • the allowed modifiers for this option



80
81
82
83
84
# File 'lib/active_configuration/option.rb', line 80

def modifiers(*values)
  run_callbacks :validate do
    @allowed_modifiers = values.collect{|value| (value.is_a?(Symbol) ? value.to_s : value)}
  end
end