Class: Sekken::XS::Element
- Inherits:
-
PrimaryType
- Object
- BaseType
- PrimaryType
- Sekken::XS::Element
- Defined in:
- lib/sekken/xs/types.rb
Instance Attribute Summary collapse
-
#ref ⇒ Object
readonly
Returns the value of attribute ref.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Attributes inherited from PrimaryType
#form, #name, #namespace, #namespaces
Attributes inherited from BaseType
Instance Method Summary collapse
-
#initialize(node, schemas, schema = {}) ⇒ Element
constructor
A new instance of Element.
- #inline_type ⇒ Object
Methods inherited from BaseType
#[], #children, #collect_attributes, #collect_child_elements, #empty?, #inspect
Constructor Details
#initialize(node, schemas, schema = {}) ⇒ Element
Returns a new instance of Element.
104 105 106 107 108 109 |
# File 'lib/sekken/xs/types.rb', line 104 def initialize(node, schemas, schema = {}) super @type = node['type'] @ref = node['ref'] end |
Instance Attribute Details
#ref ⇒ Object (readonly)
Returns the value of attribute ref.
111 112 113 |
# File 'lib/sekken/xs/types.rb', line 111 def ref @ref end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
111 112 113 |
# File 'lib/sekken/xs/types.rb', line 111 def type @type end |
Instance Method Details
#inline_type ⇒ Object
113 114 115 |
# File 'lib/sekken/xs/types.rb', line 113 def inline_type children.detect{|child| child.node.node_name.downcase != 'annotation' } end |