class Easy::Matchers::BaseValidationMatcher

Attributes

attributes[R]
failure_message[R]
failure_message_when_negated[R]
options[R]
subject[R]
type[R]

Public Class Methods

new(attributes, type) click to toggle source
# File lib/matchers/validations/base_validation_matcher.rb, line 11
def initialize(attributes, type)
  @attributes = attributes
  @failure_message = nil
  @failure_message_when_negated = nil
  @type = type
  @options = {}
end

Public Instance Methods

allow_blank() click to toggle source
# File lib/matchers/validations/base_validation_matcher.rb, line 48
def allow_blank
  raise NotImplementedError, 'Subclasses must implement a allow_blank method.'
end
allow_nil() click to toggle source
# File lib/matchers/validations/base_validation_matcher.rb, line 44
def allow_nil
  raise NotImplementedError, 'Subclasses must implement a allow_nil method.'
end
class_name() click to toggle source
# File lib/matchers/validations/base_validation_matcher.rb, line 24
def class_name
  subject.class
end
description() click to toggle source
# File lib/matchers/validations/base_validation_matcher.rb, line 28
def description
  raise NotImplementedError, 'Subclasses must implement a description method.'
end
if() click to toggle source
# File lib/matchers/validations/base_validation_matcher.rb, line 32
def if
  raise NotImplementedError, 'Subclasses must implement a if method.'
end
matches?(subject) click to toggle source
# File lib/matchers/validations/base_validation_matcher.rb, line 19
def matches?(subject)
  @subject = subject
  false
end
on(context) click to toggle source
# File lib/matchers/validations/base_validation_matcher.rb, line 40
def on(context)
  raise NotImplementedError, 'Subclasses must implement a on method.'
end
strict() click to toggle source
# File lib/matchers/validations/base_validation_matcher.rb, line 52
def strict
  raise NotImplementedError, 'Subclasses must implement a strict method.'
end
unless() click to toggle source
# File lib/matchers/validations/base_validation_matcher.rb, line 36
def unless
  raise NotImplementedError, 'Subclasses must implement a unless method.'
end