Sha256: af5e20ed59238c59716895fb125d9910ba65b4be1d841dedb9da742cef4e4347
Contents?: true
Size: 529 Bytes
Versions: 1
Compression:
Stored size: 529 Bytes
Contents
module Inspector module Metadata class Map def initialize @map = {} end def []=(type, metadata) unless metadata.kind_of?(Metadata) raise "#{metadata.inspect} is not a Inspector::Metadata" end @map[type] = metadata end def [](type) @map.fetch(type) rescue KeyError raise "validation information for #{type.inspect} doesn't exist, use " + "Inspector.valid(#{type.inspect}) to define it" end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
object-inspector-0.1.0 | lib/inspector/metadata/map.rb |