Class: WSDL::XML::Attribute Private

Inherits:
Object
  • Object
show all
Defined in:
lib/wsdl/xml/attribute.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Represents an XML attribute definition used for building SOAP messages.

Attributes are defined on complex type elements and can be either required or optional. They are rendered as XML attributes on the parent element rather than as child elements.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#base_typeString

The base type name for this attribute (e.g., 'xsd:string').

Returns:

  • (String)

    the base type name



22
23
24
# File 'lib/wsdl/xml/attribute.rb', line 22

def base_type
  @base_type
end

#nameString

The local name of this attribute.

Returns:

  • (String)

    the attribute name



17
18
19
# File 'lib/wsdl/xml/attribute.rb', line 17

def name
  @name
end

#useString

The use constraint for this attribute ('optional' or 'required'). Defaults to 'optional' if not specified in the schema.

Returns:

  • (String)

    the use constraint



28
29
30
# File 'lib/wsdl/xml/attribute.rb', line 28

def use
  @use
end

Instance Method Details

#optional?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns whether this attribute is optional.

Returns:

  • (Boolean)

    true if the attribute use is 'optional'



33
34
35
# File 'lib/wsdl/xml/attribute.rb', line 33

def optional?
  use == 'optional'
end