Class: Stupidedi::Versions::FunctionalGroups::ThirtyForty::ElementTypes::R
- Inherits:
-
SimpleElementDef
- Object
- Schema::AbstractDef
- Schema::AbstractElementDef
- Schema::SimpleElementDef
- SimpleElementDef
- Stupidedi::Versions::FunctionalGroups::ThirtyForty::ElementTypes::R
- Defined in:
- lib/stupidedi/versions/functional_groups/003040/element_types/float_val.rb
Instance Attribute Summary collapse
- #max_precision ⇒ Integer readonly
Attributes inherited from SimpleElementDef
#description, #id, #max_length, #min_length, #name, #parent
Attributes inherited from Schema::AbstractElementDef
Instance Method Summary collapse
- #companion ⇒ Object
-
#initialize(id, name, min_length, max_length, max_precision = nil, description = nil, parent = nil) ⇒ R
constructor
A new instance of R.
Methods inherited from SimpleElementDef
#copy, #empty, #parse, #pretty_print, #value
Methods inherited from Schema::SimpleElementDef
#code_lists, #component_use, #composite?, #empty, #parent, #parse, #simple?, #simple_use, #value
Methods inherited from Schema::AbstractElementDef
Methods included from Inspect
Methods inherited from Schema::AbstractDef
#component?, #composite?, #definition?, #element?, #functional_group?, #interchange?, #loop?, #repeated?, #segment?, #simple?, #table?, #transaction_set?, #usage?
Constructor Details
#initialize(id, name, min_length, max_length, max_precision = nil, description = nil, parent = nil) ⇒ R
Returns a new instance of R.
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/stupidedi/versions/functional_groups/003040/element_types/float_val.rb', line 16 def initialize(id, name, min_length, max_length, max_precision = nil, description = nil, parent = nil) super(id, name, min_length, max_length, description, parent) if max_precision.try(:>, max_length) raise ArgumentError, "max_precision cannot be greater than max_length" end @max_precision = max_precision end |
Instance Attribute Details
#max_precision ⇒ Integer (readonly)
14 15 16 |
# File 'lib/stupidedi/versions/functional_groups/003040/element_types/float_val.rb', line 14 def max_precision @max_precision end |