Sha256: 99953259778ccf1af8b4b2c96a1bfbabb2b17550754cea9ebd3ab2009c55f6b1
Contents?: true
Size: 398 Bytes
Versions: 2
Compression:
Stored size: 398 Bytes
Contents
require "membrane/errors" require "membrane/schema/base" module Membrane module Schema end end class Membrane::Schema::Value < Membrane::Schema::Base attr_reader :value def initialize(value) @value = value end def validate(object) if object != @value emsg = "Expected #{@value}, given #{object}" raise Membrane::SchemaValidationError.new(emsg) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
membrane-0.0.2 | lib/membrane/schema/value.rb |
membrane-0.0.1 | lib/membrane/schema/value.rb |