Class: Ree::Contracts::BaseValidator

Inherits:
Object
  • Object
show all
Includes:
Truncatable
Defined in:
lib/ree/contracts/validators/base_validator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Truncatable

#truncate

Constructor Details

#initialize(contract) ⇒ BaseValidator

Returns a new instance of BaseValidator.



9
10
11
# File 'lib/ree/contracts/validators/base_validator.rb', line 9

def initialize(contract)
  @contract = contract
end

Instance Attribute Details

#contractObject (readonly)

Returns the value of attribute contract.



7
8
9
# File 'lib/ree/contracts/validators/base_validator.rb', line 7

def contract
  @contract
end

Instance Method Details

#call(value) ⇒ Object

Raises:

  • (NotImplementedError)


17
18
19
# File 'lib/ree/contracts/validators/base_validator.rb', line 17

def call(value)
  raise NotImplementedError
end

#to_sObject

Raises:

  • (NotImplementedError)


13
14
15
# File 'lib/ree/contracts/validators/base_validator.rb', line 13

def to_s
  raise NotImplementedError
end