class AttrStatements::Validation

Constants

VALIDATORS

Attributes

errors[RW]
statement[RW]

Public Class Methods

new(statement) click to toggle source
# File lib/attr_statements/validation.rb, line 21
def initialize(statement)
  self.statement = statement
end

Public Instance Methods

valid?(value) click to toggle source
# File lib/attr_statements/validation.rb, line 7
def valid?(value)
  self.errors = validate_each(value)
  errors.empty?
end