Sha256: 449df6a02d6fa8e44c59d7f9ac334aa426ee0d2937a3f54f2d266ecfc7c83373
Contents?: true
Size: 670 Bytes
Versions: 2
Compression:
Stored size: 670 Bytes
Contents
require "rsqoot/client" module RSqoot class << self attr_accessor :public_api_key, :private_api_key, :base_api_url, :authentication_method, :read_timeout # Configure default credentials easily # # @yield [Sqoot] def configure load_defaults yield self raise "Authentication method must be :header or :parameter ." if !AUTHENTICATION_METHODS.include? self.authentication_method true end def load_defaults self.base_api_url ||= "https://api.sqoot.com" self.authentication_method = :header self.read_timeout = 60 end private AUTHENTICATION_METHODS = [:header, :parameter] end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
rsqoot-0.1.1 | lib/rsqoot.rb |
rqoot-0.1.0 | lib/rsqoot.rb |