Extended maintenance of Ruby versions 1.8.7 and 1.9.2 ended on July 31, 2014. Read more

In Files

  • wsdl/xmlSchema/attribute.rb

Class/Module Index [+]

Quicksearch

WSDL::XMLSchema::Attribute

Attributes

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

Public Class Methods

new() click to toggle source
 
               # File wsdl/xmlSchema/attribute.rb, line 57
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

attr_reader_ref(symbol) click to toggle 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
            
parse_attr(attr, value) click to toggle source
 
               # File wsdl/xmlSchema/attribute.rb, line 87
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) click to toggle source
 
               # File wsdl/xmlSchema/attribute.rb, line 79
def parse_element(element)
  case element
  when SimpleTypeName
    @local_simpletype = SimpleType.new
    @local_simpletype
  end
end
            
refelement() click to toggle source
 
               # File wsdl/xmlSchema/attribute.rb, line 71
def refelement
  @refelement ||= root.collect_attributes[@ref]
end
            
targetnamespace() click to toggle source
 
               # File wsdl/xmlSchema/attribute.rb, line 75
def targetnamespace
  parent.targetnamespace
end
            

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.

blog comments powered by Disqus