Module: WashOut::Configurable

Extended by:
ActiveSupport::Concern
Defined in:
lib/wash_out/configurable.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#soap_config=(obj) ⇒ Object



26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/wash_out/configurable.rb', line 26

def soap_config=(obj)

  unless obj.is_a?(Hash)
    raise "Value needs to be a Hash."
  end

  class_eval do
    if class_variable_defined?(:@@soap_config)
      class_variable_get(:@@soap_config).configure obj
    else
      class_variable_set :@@soap_config, WashOut::SoapConfig.new(obj)
    end
  end
end