module Sullivan

Constants

VERSION

Public Class Methods

validation(&block) click to toggle source
# File lib/sullivan.rb, line 2
def self.validation(&block)
  dsl = DSL.new

  case block.arity
  when 0
    dsl.instance_eval(&block)
  when 1
    block.call(dsl)
  else
    raise ArgumentError.new("Sullivan.validation's block must have an arity of 0 or 1.")
  end
end