Module: XSD::Referenced

Included in:
Attribute, AttributeGroup, Element, Group
Defined in:
lib/xsd/shared/referenced.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#refObject

Optional. Specifies a reference to a named attribute. Name and ref attributes cannot both be present. If ref is present, simpleType element, form, and type cannot be present

Returns:

  • String



# File 'lib/xsd/shared/referenced.rb', line 5

#referenceObject

Reference object

Returns:

  • BaseObject



13
14
15
16
# File 'lib/xsd/shared/referenced.rb', line 13

def self.included(obj)
  obj.property :ref, :string
  obj.link :reference, obj.mapped_name, property: :ref
end

Class Method Details

.included(obj) ⇒ Object

Reference object

Returns:

  • BaseObject



13
14
15
16
# File 'lib/xsd/shared/referenced.rb', line 13

def self.included(obj)
  obj.property :ref, :string
  obj.link :reference, obj.mapped_name, property: :ref
end

Instance Method Details

#referenced?Boolean

Is object referenced?

Returns:

  • (Boolean)

    Boolean



20
21
22
# File 'lib/xsd/shared/referenced.rb', line 20

def referenced?
  !ref.nil?
end