Class: WSDL::XMLSchema::Any

Inherits:
Info show all
Defined in:
lib/wsdl/xmlSchema/any.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

#initializeAny


23
24
25
26
27
28
29
# File 'lib/wsdl/xmlSchema/any.rb', line 23

def initialize
  super()
  @maxoccurs = 1
  @minoccurs = 1
  @namespace = '##any'
  @process_contents = 'strict'
end

Instance Attribute Details

#maxoccursObject

Returns the value of attribute maxoccurs


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

def maxoccurs
  @maxoccurs
end

#minoccursObject

Returns the value of attribute minoccurs


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

def minoccurs
  @minoccurs
end

#namespaceObject

Returns the value of attribute namespace


20
21
22
# File 'lib/wsdl/xmlSchema/any.rb', line 20

def namespace
  @namespace
end

#process_contentsObject

Returns the value of attribute process_contents


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

def process_contents
  @process_contents
end

Instance Method Details

#parse_attr(attr, value) ⇒ Object


39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/wsdl/xmlSchema/any.rb', line 39

def parse_attr(attr, value)
  case attr
  when MaxOccursAttrName
    if value.source == 'unbounded'
      @maxoccurs = nil
    else
      @maxoccurs = Integer(value.source)
    end
    value.source
  when MinOccursAttrName
    @minoccurs = Integer(value.source)
  when NamespaceAttrName
    @namespace = value.source
  when ProcessContentsAttrName
    @process_contents = value.source
  else
    nil
  end
end

#parse_element(element) ⇒ Object


35
36
37
# File 'lib/wsdl/xmlSchema/any.rb', line 35

def parse_element(element)
  nil
end

#targetnamespaceObject


31
32
33
# File 'lib/wsdl/xmlSchema/any.rb', line 31

def targetnamespace
  parent.targetnamespace
end