Sha256: 0af91fbcd80fb8cc551555405d154c8418994e143f0b4a996364b0ba9a092643
Contents?: true
Size: 957 Bytes
Versions: 3
Compression:
Stored size: 957 Bytes
Contents
require 'json' require 'hashie' require 'hashie/extensions/symbolize_keys' require 'compel/coercion/type' require 'compel/coercion/integer' require 'compel/coercion/float' require 'compel/coercion/string' require 'compel/coercion/date' require 'compel/coercion/time' require 'compel/coercion/datetime' require 'compel/coercion/hash' require 'compel/coercion/json' require 'compel/coercion/boolean' require 'compel/invalid_params_error' require 'compel/param_validation_error' require 'compel/param_type_error' require 'compel/param' require 'compel/contract' require 'compel/coercion' require 'compel/validation' require 'compel/errors' module Compel Boolean = Coercion::Boolean def self.run!(params, &block) Contract.new(params, &block).validate.raise? end def self.run?(params, &block) Contract.new(params, &block).validate.valid? end def self.run(params, &block) Contract.new(params, &block).validate.serialize end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
compel-0.1.3 | lib/compel.rb |
compel-0.1.2 | lib/compel.rb |
compel-0.1.1 | lib/compel.rb |