Class: WSDL::XMLSchema::Attribute
- Includes:
- Ref
- Defined in:
- lib/wsdl/xmlSchema/attribute.rb
Instance Attribute Summary collapse
-
#arytype ⇒ Object
Returns the value of attribute arytype.
-
#default ⇒ Object
writeonly
Sets the attribute default.
-
#fixed ⇒ Object
writeonly
Sets the attribute fixed.
-
#form ⇒ Object
writeonly
Sets the attribute form.
-
#local_simpletype ⇒ Object
writeonly
Sets the attribute local_simpletype.
-
#name ⇒ Object
writeonly
Sets the attribute name.
-
#type ⇒ Object
writeonly
Sets the attribute type.
-
#use ⇒ Object
writeonly
Sets the attribute use.
Attributes included from Ref
Attributes inherited from Info
Instance Method Summary collapse
-
#initialize ⇒ Attribute
constructor
A new instance of Attribute.
- #parse_attr(attr, value) ⇒ Object
- #parse_element(element) ⇒ Object
- #targetnamespace ⇒ Object
Methods included from Ref
Methods inherited from Info
Constructor Details
#initialize ⇒ Attribute
Returns a new instance of Attribute.
38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/wsdl/xmlSchema/attribute.rb', line 38 def initialize super @use = nil @form = nil @name = nil @type = nil @local_simpletype = nil @default = nil @fixed = nil @ref = nil @refelement = nil @arytype = nil end |
Instance Attribute Details
#arytype ⇒ Object
Returns the value of attribute arytype.
36 37 38 |
# File 'lib/wsdl/xmlSchema/attribute.rb', line 36 def arytype @arytype end |
#default=(value) ⇒ Object (writeonly)
Sets the attribute default
25 26 27 |
# File 'lib/wsdl/xmlSchema/attribute.rb', line 25 def default=(value) @default = value end |
#fixed=(value) ⇒ Object (writeonly)
Sets the attribute fixed
26 27 28 |
# File 'lib/wsdl/xmlSchema/attribute.rb', line 26 def fixed=(value) @fixed = value end |
#form=(value) ⇒ Object (writeonly)
Sets the attribute form
21 22 23 |
# File 'lib/wsdl/xmlSchema/attribute.rb', line 21 def form=(value) @form = value end |
#local_simpletype=(value) ⇒ Object (writeonly)
Sets the attribute local_simpletype
24 25 26 |
# File 'lib/wsdl/xmlSchema/attribute.rb', line 24 def local_simpletype=(value) @local_simpletype = value end |
#name=(value) ⇒ Object (writeonly)
Sets the attribute name
22 23 24 |
# File 'lib/wsdl/xmlSchema/attribute.rb', line 22 def name=(value) @name = value end |
#type=(value) ⇒ Object (writeonly)
Sets the attribute type
23 24 25 |
# File 'lib/wsdl/xmlSchema/attribute.rb', line 23 def type=(value) @type = value end |
#use=(value) ⇒ Object (writeonly)
Sets the attribute use
20 21 22 |
# File 'lib/wsdl/xmlSchema/attribute.rb', line 20 def use=(value) @use = value end |
Instance Method Details
#parse_attr(attr, value) ⇒ Object
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/wsdl/xmlSchema/attribute.rb', line 64 def parse_attr(attr, value) case attr when RefAttrName @ref = value when UseAttrName @use = value.source when FormAttrName @form = value.source when NameAttrName if directelement? @name = XSD::QName.new(targetnamespace, value.source) else @name = XSD::QName.new(nil, value.source) end when TypeAttrName @type = value when DefaultAttrName @default = value.source when FixedAttrName @fixed = value.source when ArrayTypeAttrName @arytype = value else nil end end |
#parse_element(element) ⇒ Object
56 57 58 59 60 61 62 |
# File 'lib/wsdl/xmlSchema/attribute.rb', line 56 def parse_element(element) case element when SimpleTypeName @local_simpletype = SimpleType.new @local_simpletype end end |
#targetnamespace ⇒ Object
52 53 54 |
# File 'lib/wsdl/xmlSchema/attribute.rb', line 52 def targetnamespace parent.targetnamespace end |