Sha256: 3f628e638e9887c12f08298534403adb61fd649f025d1f6ee1a9aaeac9c98ddf
Contents?: true
Size: 828 Bytes
Versions: 2
Compression:
Stored size: 828 Bytes
Contents
module Teachable module Jg class Client # Define the same set of accessors as the Teachable module attr_accessor *Configuration::VALID_CONFIG_KEYS # self.base_uri "https://#{CREDENTIALS[:host]}/#{CREDENTIALS[:path]}/Accounts/#{CREDENTIALS[:account_id]}" def initialize(_options={}) self.class.basic_auth(account_id, account_token) end def initialize(options={}) # Merge the config values from the module and those passed # to the client. merged_options = Teachable::Jg.options.merge(options) # Copy the merged values to this client and ignore those # not part of our configuration Configuration::VALID_CONFIG_KEYS.each do |key| send("#{key}=", merged_options[key]) end end end # Client end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
teachable-jg-0.0.2 | lib/teachable/jg/client.rb |
teachable-jg-0.0.1 | lib/teachable/jg/client.rb |