Sha256: c8f80c49883ff37b5bf644b99cfd7a540c8bfce06df81f3e38884e44663c8148

Contents?: true

Size: 525 Bytes

Versions: 6

Compression:

Stored size: 525 Bytes

Contents

module ActiveRecord::Turntable
  class Configuration
    class Loader::DSL
      attr_reader :path, :configuration, :dsl

      def initialize(path, configuration = Configuration.new)
        @path = path
        @configuration = configuration
        @dsl = DSL.new(@configuration)
      end

      def self.load(path, configuration = Configuration.new)
        new(path, configuration).load
      end

      def load
        @dsl.instance_eval(File.read(@path), @path, 1)

        configuration
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
activerecord-turntable-4.4.1 lib/active_record/turntable/configuration/loader/dsl.rb
activerecord-turntable-4.4.0 lib/active_record/turntable/configuration/loader/dsl.rb
activerecord-turntable-4.3.0 lib/active_record/turntable/configuration/loader/dsl.rb
activerecord-turntable-4.2.0 lib/active_record/turntable/configuration/loader/dsl.rb
activerecord-turntable-4.1.0 lib/active_record/turntable/configuration/loader/dsl.rb
activerecord-turntable-4.0.0 lib/active_record/turntable/configuration/loader/dsl.rb