Sha256: 0c128ee4f78474696e78ed980bd51c1debfc9a86445a406440ad3bf784a73ad3

Contents?: true

Size: 609 Bytes

Versions: 7

Compression:

Stored size: 609 Bytes

Contents

# encoding: UTF-8

module Spontaneous::Plugins::Site
  module Schema
    extend ActiveSupport::Concern

    module ClassMethods
      def schema
        instance.schema
      end
    end # ClassMethods

    def uid
      schema.uids
    end

    def schema_id(obj)
      schema.schema_id(obj)
    end

    def schema
      @schema ||= Spontaneous::Schema::Schema.new(root, schema_loader_class)
    end

    def schema_loader_class
      @schema_loader_class ||= Spontaneous::Schema::PersistentMap
    end

    def schema_loader_class=(loader_class)
      @schema_loader_class = loader_class
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
spontaneous-0.2.0.alpha7 lib/spontaneous/plugins/site/schema.rb
spontaneous-0.2.0.alpha6 lib/spontaneous/plugins/site/schema.rb
spontaneous-0.2.0.alpha5 lib/spontaneous/plugins/site/schema.rb
spontaneous-0.2.0.alpha4 lib/spontaneous/plugins/site/schema.rb
spontaneous-0.2.0.alpha3 lib/spontaneous/plugins/site/schema.rb
spontaneous-0.2.0.alpha2 lib/spontaneous/plugins/site/schema.rb
spontaneous-0.2.0.alpha1 lib/spontaneous/plugins/site/schema.rb