Sha256: dccbddfde839c97157998f03a8f615ada9adf6e61eb846b26df3f1ebd381bf5c

Contents?: true

Size: 377 Bytes

Versions: 6

Compression:

Stored size: 377 Bytes

Contents

module GemConfig
  module Base
    def self.included(base)
      base.extend ClassMethods
    end

    module ClassMethods
      def configure
        yield configuration
      end

      def configuration
        @configuration ||= Configuration.new
      end

      def with_configuration(&block)
        configuration.rules.instance_eval(&block)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gem_config-0.3.0 lib/gem_config/base.rb
gem_config-0.2.4 lib/gem_config/base.rb
gem_config-0.2.3 lib/gem_config/base.rb
gem_config-0.2.2 lib/gem_config/base.rb
gem_config-0.2.1 lib/gem_config/base.rb
gem_config-0.1.0 lib/gem_config/base.rb