Parent

Methods

Files

Class/Module Index [+]

Quicksearch

WSDL::SOAP::ClassDefCreator

Public Class Methods

new(definitions, name_creator, modulepath = nil) click to toggle source
# 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

Public Instance Methods

dump(type = nil) click to toggle source
# 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

[Validate]

Generated with the Darkfish Rdoc Generator 2.