Sha256: 66ad266ba79ab0250bf3e66fbf29018fff0b60fab66758e2a8a3725b5e6166dd

Contents?: true

Size: 703 Bytes

Versions: 10

Compression:

Stored size: 703 Bytes

Contents

class Configuration

  attr_accessor :user_id
  attr_accessor :password
  attr_accessor :basic_credentials

  attr_accessor :cache_enabled
  attr_accessor :tract_api_url

  #
  # initialize
  #
  def initialize
    @tract_api_url = "https://my.tractbilling.com/t/s/r/#{GoTransverseTractApi::TARGET_API_VERSION}/"
    set_basic_credentials
  end

  private

  #
  # set_basic_credentials
  #
  def set_basic_credentials

    # Perform Base-64 encoding of API login information
    user_pass = "#{@user_id.to_s}:#{@password.to_s}"

    # Sets basic_credentials attr_accessor
    @basic_credentials = Base64.encode64(user_pass)

    # Erase in-clear credentials
    @user_id = @password = nil

  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
gotransverse-tract-api-0.0.12 lib/gotransverse-tract-api/configuration.rb
gotransverse-tract-api-0.0.11 lib/gotransverse-tract-api/configuration.rb
gotransverse-tract-api-0.0.10 lib/gotransverse-tract-api/configuration.rb
gotransverse-tract-api-0.0.9 lib/gotransverse-tract-api/configuration.rb
gotransverse-tract-api-0.0.8 lib/gotransverse-tract-api/configuration.rb
gotransverse-tract-api-0.0.7 lib/gotransverse-tract-api/configuration.rb
gotransverse-tract-api-0.0.6 lib/gotransverse-tract-api/configuration.rb
gotransverse-tract-api-0.0.5 lib/gotransverse-tract-api/configuration.rb
gotransverse-tract-api-0.0.4 lib/gotransverse-tract-api/configuration.rb
gotransverse-tract-api-0.0.3 lib/gotransverse-tract-api/configuration.rb