Class: IMW::Metadata::Schema

Inherits:
Hash
  • Object
show all
Defined in:
lib/imw/metadata/schema.rb

Overview

Represents a schema for data.

FIXME add methods that help couple nicely with Avro schemata.

Instance Method Summary collapse

Methods inherited from Hash

#assoc, #compact, #compact!, #deep_merge, #deep_merge!, #dispatch, #emit, #from_pairs, #keep_merge, #quote_keys_with, #rassoc, #reverse_merge, #reverse_merge!, #slice, #slice!, #terminals, #to_openstruct, zip

Constructor Details

#initialize(obj = nil) ⇒ Schema

Returns a new instance of Schema.



10
11
12
13
# File 'lib/imw/metadata/schema.rb', line 10

def initialize obj=nil
  super()
  merge!(obj) if obj.is_a?(Hash) || obj.is_a?(Schema)
end