Sha256: 40f83c0e6790b05b95b84609cca66ebc70ef7b4d5b7833e812f1a61cc3f97654

Contents?: true

Size: 825 Bytes

Versions: 2

Compression:

Stored size: 825 Bytes

Contents

require 'logger'

module Shutl::Resource
  class << self
    attr_writer :raise_exceptions_on_validation,
                :raise_exceptions_on_no_quotes_generated

    def raise_exceptions_on_validation
      if @raise_exceptions_on_validation.nil?
        @raise_exceptions_on_validation = false
      end

      @raise_exceptions_on_validation
    end

    def raise_exceptions_on_no_quotes_generated
      if @raise_exceptions_on_no_quotes_generated.nil?
        @raise_exceptions_on_no_quotes_generated = true
      end

      @raise_exceptions_on_no_quotes_generated
    end
  end

  def configure(*args, &block)
    Configuration.configure(*args, &block)
  end

  module Configuration
    class << self
      attr_accessor :base_uri, :logging_enabled

      def configure
        yield self
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
shutl_resource-0.11.1 lib/shutl/resource/configuration.rb
shutl_resource-0.11.0 lib/shutl/resource/configuration.rb