Class: Infold::Validation::ValidateCondition

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Model
Defined in:
lib/infold/property/validation.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(condition, options) ⇒ ValidateCondition

Returns a new instance of ValidateCondition.



28
29
30
31
# File 'lib/infold/property/validation.rb', line 28

def initialize(condition, options)
  @condition = condition
  @options = options&.with_indifferent_access
end

Instance Attribute Details

#optionsObject

Returns the value of attribute options.



26
27
28
# File 'lib/infold/property/validation.rb', line 26

def options
  @options
end

Instance Method Details

#conditionObject



33
34
35
# File 'lib/infold/property/validation.rb', line 33

def condition
  @condition.to_sym
end