class OzonApi::Configuration

Public Class Methods

attribute_names() click to toggle source
# File lib/ozon_api/configuration.rb, line 8
def self.attribute_names
  [:scheme, :host, :base_path, :login, :password, :out, :debug]
end
new() { |self| ... } click to toggle source
# File lib/ozon_api/configuration.rb, line 20
def initialize
  @base_path = 'PartnerService'
  @scheme = 'https'
  @host = 'ows.ozon.ru'
  @login = ENV['OZON_LOGIN']
  @password = ENV['OZON_PASSWORD']
  @out = STDOUT
  @debug = false

  yield(self) if block_given?

  [
    @base_path,
    @scheme,
    @host,
    @login,
    @password
  ].each(&:freeze)
end

Public Instance Methods

attribute_names() click to toggle source
# File lib/ozon_api/configuration.rb, line 12
def attribute_names
  self.class.attribute_names
end