Class: Eco::Data::Locations::NodePlain
- Inherits:
-
NodePlainStruct
- Object
- Struct
- NodePlainStruct
- Eco::Data::Locations::NodePlain
- Extended by:
- Builder
- Includes:
- NodeBase
- Defined in:
- lib/eco/data/locations/node_plain.rb,
lib/eco/data/locations/node_plain/serial.rb,
lib/eco/data/locations/node_plain/builder.rb,
lib/eco/data/locations/node_plain/parsing.rb
Overview
Class to treat input csv in a form of a list of nodes, where parent is specified.
Defined Under Namespace
Modules: Builder, Parsing, Serial
Constant Summary collapse
- ALL_ATTRS =
NODE_PLAIN_ATTRS- ADDITIONAL_ATTRS =
%i[row_num]
- PROP_ATTRS =
ALL_ATTRS - ADDITIONAL_ATTRS
Constants included from Eco::Data::Locations::NodeBase::TagValidations
Eco::Data::Locations::NodeBase::TagValidations::ALLOWED_CHARACTERS, Eco::Data::Locations::NodeBase::TagValidations::DOUBLE_BLANKS, Eco::Data::Locations::NodeBase::TagValidations::INVALID_TAG_REGEX, Eco::Data::Locations::NodeBase::TagValidations::VALID_TAG_CHARS, Eco::Data::Locations::NodeBase::TagValidations::VALID_TAG_REGEX
Instance Attribute Summary
Attributes included from Serial
Attributes included from Parsing
Attributes included from NodeBase
Attributes included from Language::AuxiliarLogger
Instance Method Summary collapse
- #id ⇒ Object (also: #tag)
- #name ⇒ Object
- #parent_id ⇒ Object (also: #parentId)
Methods included from Parsing
#basic_headers, #csv_matches_format?, #nodes_from_csv
Methods included from NodeBase
#attr, #attr?, #copy, #set_attr, #set_attrs, #slice, #to_h, #values_at
Methods included from Eco::Data::Locations::NodeBase::Builder
Methods included from Eco::Data::Locations::NodeBase::Treeify
Methods included from Language::AuxiliarLogger
Methods included from Eco::Data::Locations::NodeBase::CsvConvert
#csv_list, #csv_tree, #hash_list, #hash_tree, #org_tree, #tree_class
Methods included from Eco::Data::Locations::NodeBase::Parsing
#csv_nodes_from, #hash_tree_from_csv, #nodes_from_csv
Methods included from Convert
#csv_from, #empty_array, #empty_level_tracker_hash, #hash_tree_to_tree_csv, #log_pretty_inspect, #normalize_arrays, #report_repeated_node_ids
Methods included from Eco::Data::Locations::NodeBase::Serial
#nodes_to_csv_list, #nodes_to_csv_tree, #serializer
Methods included from Eco::Data::Locations::NodeBase::TagValidations
#clean_id, #has_double_blanks?, #identify_invalid_characters, #invalid_warned, #invalid_warned!, #invalid_warned?, #remove_double_blanks, #replace_not_allowed
Instance Method Details
#id ⇒ Object Also known as: tag
17 18 19 |
# File 'lib/eco/data/locations/node_plain.rb', line 17 def id clean_id(super, ref: "(Row: #{self.row_num}) ") end |
#name ⇒ Object
23 24 25 |
# File 'lib/eco/data/locations/node_plain.rb', line 23 def name super || self.id end |
#parent_id ⇒ Object Also known as: parentId
27 28 29 |
# File 'lib/eco/data/locations/node_plain.rb', line 27 def parent_id clean_id(super, notify: false, ref: "(Row: #{self.row_num} - parent_id) ") end |