# File lib/wsdl/soap/classDefCreator.rb, line 23 def initialize(definitions, name_creator, modulepath = nil) @definitions = definitions @name_creator = name_creator @modulepath = modulepath @elements = definitions.collect_elements @elements.uniq! @attributes = definitions.collect_attributes @attributes.uniq! @simpletypes = definitions.collect_simpletypes @simpletypes.uniq! @complextypes = definitions.collect_complextypes @complextypes.uniq! @modelgroups = definitions.collect_modelgroups @modelgroups.uniq! @faulttypes = nil if definitions.respond_to?(:collect_faulttypes) @faulttypes = definitions.collect_faulttypes end @defined_const = {} end
# File lib/wsdl/soap/classDefCreator.rb, line 44 def dump(type = nil) result = "require 'xsd/qname'\n" # cannot use @modulepath because of multiple classes if @modulepath result << "\n" result << modulepath_split(@modulepath).collect { |ele| "module #{ele}" }.join("; ") result << "\n\n" end if type result << dump_classdef(type.name, type) else str = dump_group unless str.empty? result << "\n" unless result.empty? result << str end str = dump_complextype unless str.empty? result << "\n" unless result.empty? result << str end str = dump_simpletype unless str.empty? result << "\n" unless result.empty? result << str end str = dump_element unless str.empty? result << "\n" unless result.empty? result << str end str = dump_attribute unless str.empty? result << "\n" unless result.empty? result << str end end if @modulepath result << "\n\n" result << modulepath_split(@modulepath).collect { |ele| "end" }.join("; ") result << "\n" end result end
Generated with the Darkfish Rdoc Generator 2.