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

#assign_const, #basetype_mapped_class, #create_type_name, #dq, #dqname, #dump_method_signature, #mapped_class_basename, #mapped_class_name, #ndq, #nsym, #sym

Methods included from XSD::CodeGen::GenSupport

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

Constructor Details

#initialize(definitions, name_creator, modulepath = nil) ⇒ DriverCreator

Returns a new instance of DriverCreator.



26
27
28
29
30
31
# File 'lib/wsdl/soap/driverCreator.rb', line 26

def initialize(definitions, name_creator, modulepath = nil)
  @definitions = definitions
  @name_creator = name_creator
  @modulepath = modulepath
  @drivername_postfix = ''
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

#drivername_postfixObject

Returns the value of attribute drivername_postfix.



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

def drivername_postfix
  @drivername_postfix
end

Instance Method Details

#dump(porttype = nil) ⇒ Object



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

def dump(porttype = nil)
  result = "require 'soap/rpc/driver'\n\n"
  if @modulepath
    @modulepath.each do |name|
      result << "module #{name}\n"
    end
    result << "\n"
  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