class Wrappi::Client
This class is expected to handle all the configurations for your main module
Public Class Methods
domain()
click to toggle source
# File lib/wrappi/client.rb, line 41 def self.domain fail "[#{self.class}] Bad configuration: you must set the `domain` config" unless @domain @domain end
domain=(domain)
click to toggle source
# File lib/wrappi/client.rb, line 27 def self.domain=(domain) @domain = domain end
errors()
click to toggle source
# File lib/wrappi/client.rb, line 46 def self.errors [ TimeoutError, JsonParseError, NotAuthorizedAccessError ] end
root()
click to toggle source
# File lib/wrappi/client.rb, line 54 def self.root Pathname.new(File.expand_path('../../', __FILE__)) end
setup() { |self| ... }
click to toggle source
# File lib/wrappi/client.rb, line 23 def self.setup yield(self) end
timeout()
click to toggle source
# File lib/wrappi/client.rb, line 35 def self.timeout return @timeout if defined?(@timeout) self.timeout = {} @timeout end
timeout=(opts)
click to toggle source
# File lib/wrappi/client.rb, line 31 def self.timeout=(opts) @timeout = { write: 9, connect: 9, read: 9 }.merge(opts) end