Add a configure method to the class

This commit is contained in:
Dan Milne
2019-09-09 13:26:11 +10:00
parent 8ba56663ae
commit c77d41d3f1
3 changed files with 41 additions and 1 deletions

View File

@@ -8,4 +8,19 @@ require 'paapi/response'
module Paapi
class Error < StandardError; end
class NotImplemented < StandardError; end
class << self
attr_accessor :access_key,
:secret_key,
:partner_tag,
:partner_type,
:marketplace,
:test_mode
def configure
yield self
true
end
alias_method :config, :configure
end
end