Class: Sekken::XS::Element

Inherits:
PrimaryType show all
Defined in:
lib/sekken/xs/types.rb

Instance Attribute Summary collapse

Attributes inherited from PrimaryType

#form, #name, #namespace, #namespaces

Attributes inherited from BaseType

#node

Instance Method Summary collapse

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

#refObject (readonly)

Returns the value of attribute ref.



111
112
113
# File 'lib/sekken/xs/types.rb', line 111

def ref
  @ref
end

#typeObject (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_typeObject



113
114
115
# File 'lib/sekken/xs/types.rb', line 113

def inline_type
  children.detect{|child| child.node.node_name.downcase != 'annotation' }
end