Sha256: 39749e6340d82a4ed80d9b7492a2765aaa79c0763a5195348b359e91c26b1963

Contents?: true

Size: 1.09 KB

Versions: 27

Compression:

Stored size: 1.09 KB

Contents

require 'active_support/core_ext/string/inflections'

require 'universe_compiler/universe/query'

module UniverseCompiler
  module Universe

    class Base

      include UniverseCompiler::Utils::ErrorPropagation
      extend UniverseCompiler::Universe::Multiverse
      include UniverseCompiler::Universe::Entities
      include UniverseCompiler::Universe::Index
      include UniverseCompiler::Universe::Query
      include UniverseCompiler::Universe::Validation
      include UniverseCompiler::Universe::Duplication
      include UniverseCompiler::Universe::Compile
      include UniverseCompiler::Universe::Persistence

      attr_reader :name

      def initialize(name = self.class.get_unique_name)
        @name = self.class.get_unique_name name
        @entities = []
        self.class.register self
        setup_indices
      end

      def name=(value)
        self.class.universes.delete name
        @name = self.class.get_unique_name value
        self.class.register self
      end

      def compiled?
        @compiled
      end

      protected

      attr_writer :compiled

    end

  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
universe_compiler-0.3.2 lib/universe_compiler/universe.rb
universe_compiler-0.3.1 lib/universe_compiler/universe.rb
universe_compiler-0.3.0 lib/universe_compiler/universe.rb
universe_compiler-0.2.16 lib/universe_compiler/universe.rb
universe_compiler-0.2.15 lib/universe_compiler/universe.rb
universe_compiler-0.2.14 lib/universe_compiler/universe.rb
universe_compiler-0.2.13 lib/universe_compiler/universe.rb