Sha256: 088fc1972f3acfe93534f95a1c66a5177e5b3707bc62926cd733f4bb72bede8a

Contents?: true

Size: 739 Bytes

Versions: 29

Compression:

Stored size: 739 Bytes

Contents

module UniverseCompiler
  module Persistence

    module Management

      DEFAULT_ENGINE_NAME = 'BasicYamlEngine'.freeze

      def persistence_engine
        if @persistence_engine.nil?
          self.persistence_engine_name = DEFAULT_ENGINE_NAME
        end
        @persistence_engine
      end

      def persistence_engines
        UniverseCompiler::Persistence.constants.map(&:to_s).grep(/Engine$/).map do |engine_name|
          self.persistence_engine_name = engine_name
          persistence_engine
        end
      end

      def persistence_engine_name=(engine_name)
        @persistence_engine = UniverseCompiler::Persistence.const_get engine_name
        @persistence_engine_name = engine_name
      end

    end

  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
universe_compiler-0.3.2 lib/universe_compiler/persistence/management.rb
universe_compiler-0.3.1 lib/universe_compiler/persistence/management.rb
universe_compiler-0.3.0 lib/universe_compiler/persistence/management.rb
universe_compiler-0.2.16 lib/universe_compiler/persistence/management.rb
universe_compiler-0.2.15 lib/universe_compiler/persistence/management.rb
universe_compiler-0.2.14 lib/universe_compiler/persistence/management.rb
universe_compiler-0.2.13 lib/universe_compiler/persistence/management.rb
universe_compiler-0.2.12 lib/universe_compiler/persistence/management.rb
universe_compiler-0.2.11 lib/universe_compiler/persistence/management.rb