Class: WSDL::Part

Inherits:
Info show all
Defined in:
lib/wsdl/part.rb

Instance Attribute Summary collapse

Attributes inherited from Info

#id, #parent, #root

Instance Method Summary collapse

Methods inherited from Info

#inspect, #parse_epilogue

Constructor Details

#initializePart

Returns a new instance of Part.


21
22
23
24
25
26
# File 'lib/wsdl/part.rb', line 21

def initialize
  super
  @name = nil
  @element = nil
  @type = nil
end

Instance Attribute Details

#elementObject (readonly)

optional


18
19
20
# File 'lib/wsdl/part.rb', line 18

def element
  @element
end

#nameObject (readonly)

required


17
18
19
# File 'lib/wsdl/part.rb', line 17

def name
  @name
end

#typeObject (readonly)

optional


19
20
21
# File 'lib/wsdl/part.rb', line 19

def type
  @type
end

Instance Method Details

#parse_attr(attr, value) ⇒ Object


38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/wsdl/part.rb', line 38

def parse_attr(attr, value)
  case attr
  when NameAttrName
    @name = value.source
  when ElementAttrName
    @element = value
  when TypeAttrName
    @type = value
  else
    nil
  end
end

#parse_element(element) ⇒ Object


28
29
30
31
32
33
34
35
36
# File 'lib/wsdl/part.rb', line 28

def parse_element(element)
  case element
  when DocumentationName
    o = Documentation.new
    o
  else
    nil
  end
end