class UberCar::Configuration

Constants

AUTH_KEYS

Public Class Methods

new(config_hash = nil) click to toggle source
# File lib/uber/configuration.rb, line 6
def initialize(config_hash = nil)
  if config_hash.is_a?(Hash)
    config_hash.each do |config_name, config_value|
      self.send("#{config_name}=", config_value)
    end
  end
end

Public Instance Methods

auth_keys() click to toggle source

Returns a hash of api keys and their values

# File lib/uber/configuration.rb, line 15
def auth_keys
  AUTH_KEYS.inject({}) do |keys_hash, key|
    keys_hash[key] = send(key)
    keys_hash
  end
end
valid?() click to toggle source
# File lib/uber/configuration.rb, line 22
def valid?
  AUTH_KEYS.none? { |key| send(key).nil? || send(key).empty? }
end