Class: Junoser::Xsd::Enumeration
- Inherits:
-
Object
- Object
- Junoser::Xsd::Enumeration
- Includes:
- Base
- Defined in:
- lib/junoser/xsd/enumeration.rb
Constant Summary
Constants included from Base
Instance Attribute Summary
Attributes included from Base
Instance Method Summary collapse
- #config ⇒ Object
-
#initialize(xml, options = {}) ⇒ Enumeration
constructor
A new instance of Enumeration.
- #to_s ⇒ Object
Methods included from Base
#children, #inspect, #oneliner?, #root?
Constructor Details
#initialize(xml, options = {}) ⇒ Enumeration
Returns a new instance of Enumeration.
10 11 12 |
# File 'lib/junoser/xsd/enumeration.rb', line 10 def initialize(xml, = {}) super end |
Instance Method Details
#config ⇒ Object
14 15 16 17 18 |
# File 'lib/junoser/xsd/enumeration.rb', line 14 def config raise 'ERROR: unknown Enumeration format' if children.size > 1 has_match? ? ['arg'] : [%("#{xml['value']}")] end |
#to_s ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/junoser/xsd/enumeration.rb', line 20 def to_s if nokeyword? fmt("#{OFFSET}arg") else fmt(OFFSET + config.first) end end |