Class: Enterprisifier::Marshalling::XSD::Schema::Attribute
- Inherits:
-
Object
- Object
- Enterprisifier::Marshalling::XSD::Schema::Attribute
- Defined in:
- lib/enterprisifier/marshalling/xsd/schema/attribute.rb
Defined Under Namespace
Classes: InstantiatableAttribute
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(type_def = nil) ⇒ Attribute
constructor
InstantiatableAttribute.
- #reified ⇒ Object
- #reify(reifiable) ⇒ Object
Methods included from SchemaComposition::TypeDefSetting
Methods included from SchemaComposition
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
#name ⇒ Object (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
#reified ⇒ Object
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 |