Class: WSDL::Part

Inherits:
Info
  • Object
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


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

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

Instance Attribute Details

#elementObject (readonly)

optional


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

def element
  @element
end

#nameObject (readonly)

required


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

def name
  @name
end

#typeObject (readonly)

optional


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

def type
  @type
end

Instance Method Details

#parse_attr(attr, value) ⇒ Object


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

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


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

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