Sha256: 8cebf5f99d3a7dc40af9e0db847579d8b00a4fd729dd92cfbf66db038443d9a8

Contents?: true

Size: 427 Bytes

Versions: 9

Compression:

Stored size: 427 Bytes

Contents

module ActiveDynamic

  @@configuration = nil

  def self.configure
    @@configuration = Configuration.new

    if block_given?
      yield configuration
    end

    configuration
  end

  def self.configuration
    @@configuration || configure
  end

  class Configuration

    def provider_class
      @provider_class || NullProvider
    end

    def provider_class=(klass)
      @provider_class = klass
    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
active_dynamic-0.5.4 lib/active_dynamic/configuration.rb
active_dynamic-0.5.3 lib/active_dynamic/configuration.rb
active_dynamic-0.5.2 lib/active_dynamic/configuration.rb
active_dynamic-0.5.1 lib/active_dynamic/configuration.rb
active_dynamic-0.5.0 lib/active_dynamic/configuration.rb
active_dynamic-0.4.0 lib/active_dynamic/configuration.rb
active_dynamic-0.3.0 lib/active_dynamic/configuration.rb
active_dynamic-0.2.0 lib/active_dynamic/configuration.rb
active_dynamic-0.1.0 lib/active_dynamic/configuration.rb