Class: Sekken::XS::PrimaryType
- Defined in:
- lib/sekken/xs/types.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#form ⇒ Object
readonly
Returns the value of attribute form.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#namespace ⇒ Object
readonly
Returns the value of attribute namespace.
-
#namespaces ⇒ Object
readonly
Returns the value of attribute namespaces.
Attributes inherited from BaseType
Instance Method Summary collapse
-
#initialize(node, schemas, schema = {}) ⇒ PrimaryType
constructor
A new instance of PrimaryType.
Methods inherited from BaseType
#[], #children, #collect_attributes, #collect_child_elements, #empty?, #inspect
Constructor Details
#initialize(node, schemas, schema = {}) ⇒ PrimaryType
Returns a new instance of PrimaryType.
62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/sekken/xs/types.rb', line 62 def initialize(node, schemas, schema = {}) super @namespace = schema[:target_namespace] @element_form_default = schema[:element_form_default] @name = node['name'] # Because you've overriden the form method, you don't need to set # unqualified as the default when no form is specified. #@form = node['form'] || 'unqualified' @form = node['form'] @namespaces = node.namespaces end |
Instance Attribute Details
#form ⇒ Object (readonly)
Returns the value of attribute form.
77 78 79 |
# File 'lib/sekken/xs/types.rb', line 77 def form @form end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
77 78 79 |
# File 'lib/sekken/xs/types.rb', line 77 def name @name end |
#namespace ⇒ Object (readonly)
Returns the value of attribute namespace.
77 78 79 |
# File 'lib/sekken/xs/types.rb', line 77 def namespace @namespace end |
#namespaces ⇒ Object (readonly)
Returns the value of attribute namespaces.
77 78 79 |
# File 'lib/sekken/xs/types.rb', line 77 def namespaces @namespaces end |