Sha256: abb615fc1ca3d33d042d86bc3e8d006e6b5a222fc66cb4dc897f376b8f78795e

Contents?: true

Size: 624 Bytes

Versions: 4

Compression:

Stored size: 624 Bytes

Contents

# encoding: UTF-8

class Spontaneous::Site
  module Schema
    extend Spontaneous::Concern

    module ClassMethods
      def schema
        instance.schema
      end
    end # ClassMethods

    def uid
      schema.uids
    end

    def schema_id(obj)
      schema.to_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.schema_loader_class = (@schema_loader_class = loader_class)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
spontaneous-0.2.0.beta4 lib/spontaneous/site/schema.rb
spontaneous-0.2.0.beta3 lib/spontaneous/site/schema.rb
spontaneous-0.2.0.beta2 lib/spontaneous/site/schema.rb
spontaneous-0.2.0.beta1 lib/spontaneous/site/schema.rb