Class: XsdModel::Elements::Element
- Inherits:
-
Object
- Object
- XsdModel::Elements::Element
- Includes:
- BaseElement
- Defined in:
- lib/xsd_model/elements/element.rb
Constant Summary
Constants included from BaseElement
Instance Attribute Summary
Attributes included from BaseElement
#attributes, #children, #namespaces
Instance Method Summary collapse
Methods included from BaseElement
#==, #basic_xsd_type?, #element_name, #empty?, #has_custom_type?, #initialize, #method_missing, #reverse_traverse, #xsd_prefix
Methods included from AttributeMethods
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class XsdModel::Elements::BaseElement
Instance Method Details
#max_occurs ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/xsd_model/elements/element.rb', line 6 def max_occurs value = attributes['maxOccurs'] case value when 'unbounded' then Float::INFINITY when String then value.to_i when nil then 1 end end |
#multiple? ⇒ Boolean
19 20 21 |
# File 'lib/xsd_model/elements/element.rb', line 19 def multiple? max_occurs > 1 end |