Class: WSDL::SOAP::DriverCreator

Inherits:
Object
  • Object
show all
Includes:
ClassDefCreatorSupport
Defined in:
lib/wsdl/soap/driverCreator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ClassDefCreatorSupport

#basetype_mapped_class, #create_class_name, #dq, #dqname, #dump_method_signature, #ndq, #nsym, #sym

Methods included from XSD::CodeGen::GenSupport

capitalize, constant?, #format, keyword?, safeconstname, safeconstname?, safemethodname, safemethodname?, safevarname, safevarname?, uncapitalize

Constructor Details

#initialize(definitions, modulepath = nil) ⇒ DriverCreator

Returns a new instance of DriverCreator.



25
26
27
28
# File 'lib/wsdl/soap/driverCreator.rb', line 25

def initialize(definitions, modulepath = nil)
  @definitions = definitions
  @modulepath = modulepath
end

Instance Attribute Details

#definitionsObject (readonly)

Returns the value of attribute definitions.



23
24
25
# File 'lib/wsdl/soap/driverCreator.rb', line 23

def definitions
  @definitions
end

Instance Method Details

#dump(porttype = nil) ⇒ Object



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/wsdl/soap/driverCreator.rb', line 30

def dump(porttype = nil)
  result = ''
  if @modulepath
    result << "\n"
    @modulepath.each do |name|
      result << "module #{name}\n"
    end
  end
  if porttype.nil?
    @definitions.porttypes.each do |type|
	result << dump_porttype(type.name)
	result << "\n"
    end
  else
    result << dump_porttype(porttype)
  end
  if @modulepath
    result << "\n"
    @modulepath.each do |name|
      result << "end\n"
    end
  end
  result
end