Class: WSDL::XMLSchema::SimpleExtension

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

#initializeSimpleExtension

Returns a new instance of SimpleExtension.



22
23
24
25
26
# File 'lib/wsdl/xmlSchema/simpleExtension.rb', line 22

def initialize
  super
  @base = nil
  @attributes = XSD::NamedElements.new
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



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

def attributes
  @attributes
end

#baseObject (readonly)

Returns the value of attribute base.



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

def base
  @base
end

Instance Method Details

#parse_attr(attr, value) ⇒ Object



53
54
55
56
57
58
# File 'lib/wsdl/xmlSchema/simpleExtension.rb', line 53

def parse_attr(attr, value)
  case attr
  when BaseAttrName
    @base = value
  end
end

#parse_element(element) ⇒ Object



36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/wsdl/xmlSchema/simpleExtension.rb', line 36

def parse_element(element)
  case element
  when AttributeName
    o = Attribute.new
    @attributes << o
    o
  when AttributeGroupName
    o = AttributeGroup.new
    @attributes << o
    o
  when AnyAttributeName
    o = AnyAttribute.new
    @attributes << o
    o
  end
end

#targetnamespaceObject



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

def targetnamespace
  parent.targetnamespace
end

#valid?(value) ⇒ Boolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/wsdl/xmlSchema/simpleExtension.rb', line 32

def valid?(value)
  true
end