Class: WSDL::XMLSchema::Attribute

Class | WSDL::XMLSchema::Attribute
In: | wsdl/xmlSchema/attribute.rb
Parent: | Info

### Methods

attr_reader_ref attr_reader_ref new parse_attr parse_element refelement targetnamespace

### Attributes

arytype | [RW] |
default | [W] |
fixed | [W] |
form | [W] |
local_simpletype | [W] |
name | [W] |
ref | [RW] |
type | [W] |
use | [W] |

### Public Class methods

attr_reader_ref(symbol)

[Source]

    # File wsdl/xmlSchema/attribute.rb, line 19
          def attr_reader_ref(symbol)
            name = symbol.to_s
            define_method(name) {
              instance_variable_get("@#{name}") ||
                (refelement ? refelement.__send__(name) : nil)
            }
          end

attr_reader_ref(symbol)

[Source]

    # File wsdl/xmlSchema/attribute.rb, line 27
          def attr_reader_ref(symbol)
            name = symbol.to_s
            module_eval "def \#{name}\n@\#{name} || (refelement ? refelement.\#{name} : nil)\nend\n"
          end

new()

[Source]

    # File wsdl/xmlSchema/attribute.rb, line 58
      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

### Public Instance methods

parse_attr(attr, value)

[Source]

    # File wsdl/xmlSchema/attribute.rb, line 88
      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 = if value.namespace.nil?
              XSD::QName.new(XSD::Namespace, value.source)
            else
              value
            end
        else
          nil
        end
      end

parse_element(element)

[Source]

    # File wsdl/xmlSchema/attribute.rb, line 80
      def parse_element(element)
        case element
        when SimpleTypeName
          @local_simpletype = SimpleType.new
          @local_simpletype
        end
      end

refelement()

[Source]

    # File wsdl/xmlSchema/attribute.rb, line 72
      def refelement
        @refelement ||= root.collect_attributes[@ref]
      end

targetnamespace()

[Source]

    # File wsdl/xmlSchema/attribute.rb, line 76
      def targetnamespace
        parent.targetnamespace
      end

[Validate]