Class: Eancom::Edifact::BGM
- Defined in:
- lib/eancom/edifact/segments/bgm.rb
Constant Summary collapse
- TAG =
'BGM'.freeze
- TYPE =
:body.freeze
Instance Attribute Summary collapse
-
#segment_type ⇒ Object
readonly
Returns the value of attribute segment_type.
Attributes inherited from Segment
Instance Method Summary collapse
-
#initialize(tag: nil, document_name_code:, code_list_responsible_agency_code: nil, code_list_identification_code: nil, document_name: nil, document_identifier: nil, message_function_code: nil) ⇒ BGM
constructor
A new instance of BGM.
- #starts_message? ⇒ Boolean
- #to_json_hash ⇒ Object
Methods inherited from Segment
#array, #group_name, initialize_by_components, #is_body?, #is_footer?, #is_header?, #item_group_name, #starts_item?, #structure, #tag?, #to_edi, #to_hash, #to_s, #validate_structure
Constructor Details
#initialize(tag: nil, document_name_code:, code_list_responsible_agency_code: nil, code_list_identification_code: nil, document_name: nil, document_identifier: nil, message_function_code: nil) ⇒ BGM
Returns a new instance of BGM.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/eancom/edifact/segments/bgm.rb', line 9 def initialize( tag: nil, document_name_code:, code_list_responsible_agency_code: nil, code_list_identification_code: nil, document_name: nil, document_identifier: nil, message_function_code: nil ) @tag = tag @document_name_code = document_name_code @code_list_responsible_agency_code = code_list_responsible_agency_code @code_list_identification_code = code_list_identification_code @document_name = document_name @document_identifier = document_identifier @message_function_code = super(tag: tag || TAG) end |
Instance Attribute Details
#segment_type ⇒ Object (readonly)
Returns the value of attribute segment_type.
7 8 9 |
# File 'lib/eancom/edifact/segments/bgm.rb', line 7 def segment_type @segment_type end |
Instance Method Details
#starts_message? ⇒ Boolean
37 38 39 |
# File 'lib/eancom/edifact/segments/bgm.rb', line 37 def true end |
#to_json_hash ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/eancom/edifact/segments/bgm.rb', line 29 def to_json_hash { document_name_code: @document_name_code, document_identifier: @document_identifier, message_function_code: @message_function_code } end |