Module: NxtSchema::Registry::ClassMethods

Defined in:
lib/nxt_schema/registry.rb

Instance Method Summary collapse

Instance Method Details

#inherited(subclass) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/nxt_schema/registry.rb', line 8

def inherited(subclass)
  schemas.each do |key, schema|
    subclass.schemas.register(key, schema)
  end

  super
end

#schemasObject



4
5
6
# File 'lib/nxt_schema/registry.rb', line 4

def schemas
  @schemas ||= NxtSchema::Registry::Proxy.new(self)
end