Sha256: 12d0a8bed9fbb183020139990d5c6f274f517bb51068c7f546f031a43adddafe

Contents?: true

Size: 372 Bytes

Versions: 2

Compression:

Stored size: 372 Bytes

Contents

require 'jschematic/context'

module Jschematic
  def self.validate(instance, schema, opts={})
    validate!(instance, schema, opts)
  rescue ValidationError
    false
  end

  def self.validate!(instance, schema, opts={})
    self.debug = opts[:debug]
    Context.new(*opts[:context]).validate!(instance, schema)
  end

  class << self
    attr_accessor :debug
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jschematic-0.1.0 lib/jschematic.rb
jschematic-0.0.9 lib/jschematic.rb