Sha256: f80c0e1759fe967e2f909c47d05f2924b48f12b793233ea58c84e1959ae0c5da

Contents?: true

Size: 429 Bytes

Versions: 2

Compression:

Stored size: 429 Bytes

Contents

require 'configurator/option'

module Configurator
  autoload :Configuration, 'configurator/configuration'
  include Option

  def self.extended(base)
    base.class_eval { remove_instance_variable(:@configuration) if defined? @configuration }
  end

  def config(&block)
    @configuration ||= Configuration.new
    if block_given?
      @configuration.instance_exec(@configuration, &block)
    end
    @configuration
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
configurator2-0.1.3 lib/configurator.rb
configurator2-0.1.2 lib/configurator.rb