Class: SOAP::MultiService::Client::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/soapex/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Config

Returns a new instance of Config.



20
21
22
23
24
25
26
27
28
29
# File 'lib/soapex/client.rb', line 20

def initialize(options={})
  @sandbox = false
  IO.foreach(filename) do |line|
    next if line =~ /^#/
    name, value = line.split('=')
    value = (options[name] || value.strip)
    instance_variable_set(atsym(name), value)
  end
  @sandbox = ['True', 'true', '1'].include?(@sandbox.strip)
end

Instance Method Details

#filenameObject

Raises:

  • (NotImplementedError)


31
32
33
34
# File 'lib/soapex/client.rb', line 31

def filename
  raise NotImplementedError.new(
    'method filename must be implemented by a subclass')
end