Sha256: 6ae16d11c2299e96803f27675b6746def6b0ee5239ef55ee71ca7936d7a7320a

Contents?: true

Size: 516 Bytes

Versions: 10

Compression:

Stored size: 516 Bytes

Contents

# frozen_string_literal: true

module Billomat
  # The +billomat+ gem configuration.
  class Configuration
    attr_accessor :api_key, :subdomain, :timeout, :app_id, :app_secret
    attr_reader :after_response

    # Sets a callback to be called for each API response
    #
    # @param [Proc] callback The callback
    def after_response=(callback)
      unless callback.respond_to?(:call)
        raise ArgumentError, "callback must respond to `call'"
      end

      @after_response = callback
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
billomat-1.5.0 lib/billomat/configuration.rb
billomat-1.4.1 lib/billomat/configuration.rb
billomat-1.4.0 lib/billomat/configuration.rb
billomat-1.3.0 lib/billomat/configuration.rb
billomat-1.2.5 lib/billomat/configuration.rb
billomat-1.2.4 lib/billomat/configuration.rb
billomat-1.2.3 lib/billomat/configuration.rb
billomat-1.2.2 lib/billomat/configuration.rb
billomat-1.2.1 lib/billomat/configuration.rb
billomat-1.2.0 lib/billomat/configuration.rb