Class: Stupidedi::Versions::Common::ElementTypes::TM
- Inherits:
-
SimpleElementDef
- Object
- Schema::AbstractDef
- Schema::AbstractElementDef
- Schema::SimpleElementDef
- SimpleElementDef
- Stupidedi::Versions::Common::ElementTypes::TM
- Defined in:
- lib/stupidedi/versions/common/element_types/tm.rb
Instance Attribute Summary
Attributes inherited from SimpleElementDef
#description, #id, #max_length, #min_length, #name, #parent
Attributes inherited from Schema::AbstractElementDef
Instance Method Summary collapse
- #companion
-
#initialize(id, name, min_length, max_length, description = nil, parent = nil) ⇒ TM
constructor
A new instance of TM.
Methods inherited from SimpleElementDef
Methods inherited from Schema::SimpleElementDef
#code_lists, #component_use, #composite?, #empty, #parent, #parse, #simple?, #simple_use, #value
Methods inherited from Schema::AbstractElementDef
#code_lists, #composite?, #descriptor, #element?, #simple?
Methods included from Inspect
Methods inherited from Schema::AbstractDef
#component?, #composite?, #definition?, #descriptor, #element?, #functional_group?, #interchange?, #loop?, #repeated?, #required?, #segment?, #simple?, #table?, #transaction_set?, #usage?
Constructor Details
#initialize(id, name, min_length, max_length, description = nil, parent = nil) ⇒ TM
Returns a new instance of TM.
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/stupidedi/versions/common/element_types/tm.rb', line 9 def initialize(id, name, min_length, max_length, description = nil, parent = nil) super(id, name, min_length, max_length, description) unless min_length == 2 or min_length == 4 or min_length >= 6 raise Exceptions::InvalidSchemaError, "min_length must be either 2, 4, 6, or greater" end unless max_length == 2 or max_length == 4 or max_length >= 6 raise Exceptions::InvalidSchemaError, "max_length must be either 2, 4, 6, or greater" end end |
Instance Method Details
#companion
23 24 25 |
# File 'lib/stupidedi/versions/common/element_types/tm.rb', line 23 def companion TimeVal end |