Class: WashOut::Type

Inherits:
Object
  • Object
show all
Defined in:
lib/wash_out/type.rb

Class Method Summary collapse

Class Method Details

.map(value) ⇒ Object

Raises:

  • (RuntimeError)


8
9
10
11
# File 'lib/wash_out/type.rb', line 8

def self.map(value)
  raise RuntimeError, "Wrong definition: #{value.inspect}" unless value.is_a?(Hash)
  @param_map = value
end

.type_name(value) ⇒ Object



4
5
6
# File 'lib/wash_out/type.rb', line 4

def self.type_name(value)
  @param_type_name = value.to_s
end

.wash_out_param_mapObject



13
14
15
# File 'lib/wash_out/type.rb', line 13

def self.wash_out_param_map
  @param_map
end

.wash_out_param_name(soap_config = nil) ⇒ Object



17
18
19
20
21
22
23
24
25
26
27
# File 'lib/wash_out/type.rb', line 17

def self.wash_out_param_name(soap_config = nil)
  soap_config ||= WashOut::SoapConfig.new({})
  @param_type_name ||= name.underscore.gsub '/', '.'

  if soap_config.camelize_wsdl.to_s == 'lower'
    @param_type_name = @param_type_name.camelize(:lower)
  elsif soap_config.camelize_wsdl
    @param_type_name = @param_type_name.camelize
  end
  @param_type_name
end