Class: Cure::Validator::BaseRule

Inherits:
Object
  • Object
show all
Defined in:
lib/cure/validator/base_rule.rb

Direct Known Subclasses

CustomRule, LengthRule, NotNullRule

Instance Method Summary collapse

Constructor Details

#initialize(named_range, column, options) ⇒ BaseRule

Returns a new instance of BaseRule.



15
16
17
18
19
# File 'lib/cure/validator/base_rule.rb', line 15

def initialize(named_range, column, options)
  @named_range = named_range
  @column = column
  @options = options
end

Instance Method Details

#process(_value) ⇒ Object

Raises:

  • (NotImplementedError)


21
22
23
# File 'lib/cure/validator/base_rule.rb', line 21

def process(_value)
  raise NotImplementedError, "#{self.class} has not implemented method '#{__method__}'"
end

#to_sObject



25
26
27
# File 'lib/cure/validator/base_rule.rb', line 25

def to_s
  "Base Rule"
end