Class: Enterprisifier::Marshalling::XSD::Schema::Attribute

Inherits:
Object
  • Object
show all
Includes:
SchemaComposition, SchemaComposition::TypeDefSetting
Defined in:
lib/enterprisifier/marshalling/xsd/schema/attribute.rb

Defined Under Namespace

Classes: InstantiatableAttribute

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from SchemaComposition::TypeDefSetting

#reify_self

Methods included from SchemaComposition

included

Constructor Details

#initialize(type_def = nil) ⇒ Attribute

InstantiatableAttribute



24
25
26
27
# File 'lib/enterprisifier/marshalling/xsd/schema/attribute.rb', line 24

def initialize(type_def = nil)
  super
  set_type_def(type_def)
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



13
14
15
# File 'lib/enterprisifier/marshalling/xsd/schema/attribute.rb', line 13

def name
  @name
end

Instance Method Details

#reifiedObject

TODO:
  • uuuugly



36
37
38
39
40
41
42
# File 'lib/enterprisifier/marshalling/xsd/schema/attribute.rb', line 36

def reified
  return @reference.reified if @reference && @reference.respond_to?(:reified)
  @reified ||= Class.new(InstantiatableAttribute).tap do |inst|
    inst.attribute_name = name
    inst.attribute_namespace = namespace
  end
end

#reify(reifiable) ⇒ Object



29
30
31
32
# File 'lib/enterprisifier/marshalling/xsd/schema/attribute.rb', line 29

def reify(reifiable)
  super
  reifiable.has_attribute(namespace, name, reified)
end