Sha256: f5a6561b8c9b18e0dcf904a44e1a1478e1d014d6c400c4933ff40961dc35bd63

Contents?: true

Size: 531 Bytes

Versions: 2

Compression:

Stored size: 531 Bytes

Contents

# Define the configuration base class for the API Client
class Configuration
  class ApiClientError < StandardError; end

  attr_accessor :base_url, :sophia_user, :sophia_password, :is_sophia_production

  def initialize
    @base_url = nil
    @sophia_user = nil
    @sophia_password = nil
    @is_sophia_production = true
    return unless @sophia_user.nil? || @sophia_password.nil? || @base_url.nil?

    raise "It is mandatory to define the configuration defining the 'SOPHIA_USER', 'SOPHIA_PASSWORD' and 'BASE_URL'"
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sophia_service-0.3.0 lib/sophia_service/configuration.rb
sophia_service-0.2.0 lib/sophia_service/configuration.rb