Class: WSDL::XMLSchema::SimpleType
- Inherits:
-
Info
show all
- Defined in:
- lib/wsdl/xmlSchema/simpleType.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
#initialize(name = nil) ⇒ SimpleType
Returns a new instance of SimpleType.
40
41
42
43
44
45
|
# File 'lib/wsdl/xmlSchema/simpleType.rb', line 40
def initialize(name = nil)
super()
@name = name
@restriction = nil
@list = nil
end
|
Instance Attribute Details
Returns the value of attribute list.
20
21
22
|
# File 'lib/wsdl/xmlSchema/simpleType.rb', line 20
def list
@list
end
|
Returns the value of attribute name.
18
19
20
|
# File 'lib/wsdl/xmlSchema/simpleType.rb', line 18
def name
@name
end
|
#restriction ⇒ Object
Returns the value of attribute restriction.
19
20
21
|
# File 'lib/wsdl/xmlSchema/simpleType.rb', line 19
def restriction
@restriction
end
|
Instance Method Details
32
33
34
35
36
37
38
|
# File 'lib/wsdl/xmlSchema/simpleType.rb', line 32
def base
if @restriction
@restriction.base
else
nil
end
end
|
22
23
24
25
26
27
28
29
30
|
# File 'lib/wsdl/xmlSchema/simpleType.rb', line 22
def check_lexical_format(value)
if @restriction
check_restriction(value)
elsif @list
else
raise ArgumentError.new("incomplete simpleType")
end
end
|
#parse_attr(attr, value) ⇒ Object
62
63
64
65
66
67
|
# File 'lib/wsdl/xmlSchema/simpleType.rb', line 62
def parse_attr(attr, value)
case attr
when NameAttrName
@name = XSD::QName.new(targetnamespace, value.source)
end
end
|
#parse_element(element) ⇒ Object
#targetnamespace ⇒ Object
47
48
49
|
# File 'lib/wsdl/xmlSchema/simpleType.rb', line 47
def targetnamespace
parent.targetnamespace
end
|