Class: WSDL::XMLSchema::XSD2Ruby

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#basedirObject

Returns the value of attribute basedir.



24
25
26
# File 'lib/wsdl/xmlSchema/xsd2ruby.rb', line 24

def basedir
  @basedir
end

#locationObject

Returns the value of attribute location.



21
22
23
# File 'lib/wsdl/xmlSchema/xsd2ruby.rb', line 21

def location
  @location
end

#loggerObject

Returns the value of attribute logger.



23
24
25
# File 'lib/wsdl/xmlSchema/xsd2ruby.rb', line 23

def logger
  @logger
end

#optObject (readonly)

Returns the value of attribute opt.



22
23
24
# File 'lib/wsdl/xmlSchema/xsd2ruby.rb', line 22

def opt
  @opt
end

Instance Method Details

#runObject



26
27
28
29
30
31
32
33
# File 'lib/wsdl/xmlSchema/xsd2ruby.rb', line 26

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