Class: WSDL::XMLSchema::XSD2Ruby

Inherits:
Object
  • Object
show all
Includes:
SOAP::ClassDefCreatorSupport
Defined in:
lib/wsdl/xmlSchema/xsd2ruby.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from SOAP::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

Instance Attribute Details

#basedirObject

Returns the value of attribute basedir.



29
30
31
# File 'lib/wsdl/xmlSchema/xsd2ruby.rb', line 29

def basedir
  @basedir
end

#locationObject

Returns the value of attribute location.



26
27
28
# File 'lib/wsdl/xmlSchema/xsd2ruby.rb', line 26

def location
  @location
end

#loggerObject

Returns the value of attribute logger.



28
29
30
# File 'lib/wsdl/xmlSchema/xsd2ruby.rb', line 28

def logger
  @logger
end

#optObject (readonly)

Returns the value of attribute opt.



27
28
29
# File 'lib/wsdl/xmlSchema/xsd2ruby.rb', line 27

def opt
  @opt
end

Instance Method Details

#runObject



31
32
33
34
35
36
37
38
# File 'lib/wsdl/xmlSchema/xsd2ruby.rb', line 31

def run
  unless @location
    raise RuntimeError, "XML Schema location not given"
  end
  @xsd = import(@location)
  @name = @opt['classdef'] || create_classname(@xsd)
  create_file
end