class Eancom::Edifact::MEA
Constants
- TAG
- TYPE
Attributes
segment_type[R]
Public Class Methods
new( tag: nil, measurement_purpose_code_qualifier:, measured_attribute_code:, measurement_significance_code: nil, measurment_unit_code:, measurement_value:, range_minimum_value: nil, range_maximum_value: nil )
click to toggle source
Calls superclass method
Eancom::Edifact::Segment::new
# File lib/eancom/edifact/segments/mea.rb, line 9 def initialize( tag: nil, measurement_purpose_code_qualifier:, measured_attribute_code:, measurement_significance_code: nil, measurment_unit_code:, measurement_value:, range_minimum_value: nil, range_maximum_value: nil ) @tag = tag @measurement_purpose_code_qualifier = measurement_purpose_code_qualifier @measured_attribute_code = measured_attribute_code @measurement_significance_code = measurement_significance_code @measurment_unit_code = measurment_unit_code @measurement_value = measurement_value @range_minimum_value = range_minimum_value @range_maximum_value = range_maximum_value super(tag: tag || TAG) end
Public Instance Methods
group_name()
click to toggle source
# File lib/eancom/edifact/segments/mea.rb, line 44 def group_name 'characterisitcs' end
to_json_hash()
click to toggle source
# File lib/eancom/edifact/segments/mea.rb, line 32 def to_json_hash hash = {} hash.merge!(measurement_purpose_code_qualifier: find_identifier(:measurement_purpose_code_qualifier)) if @measurement_purpose_code_qualifier hash.merge!(measured_attribute_code: find_identifier(:measured_attribute_code)) if @measured_attribute_code hash.merge!(measurement_significance_code: find_identifier(:measurement_significance_code)) if @measurement_significance_code hash.merge!(measurment_unit_code: find_identifier(:measurment_unit_code)) if @measurment_unit_code hash.merge!(measurement_value: @measurement_value) if @measurement_value hash.merge!(range_minimum_value: @range_minimum_value) if @range_minimum_value hash.merge!(range_maximum_value: @range_maximum_value) if @range_maximum_value hash end