Sha256: 61a8e2de1a73045cf268a3d95d9f4d6da30d7ad331d47488951b234112f9d9e6
Contents?: true
Size: 1005 Bytes
Versions: 17
Compression:
Stored size: 1005 Bytes
Contents
module Eco::API::UseCases::GraphQL::Samples::Location::Service module TreeDiff module Convertible module Parsing module Classifications include Helpers # Input classification values into actual # classification values CLASSIFICATION_MAPS = {}.freeze private def transform_classifications(row) return row if node_classifications_maping.empty? row['classifications'] = into_a(row['classifications']).map do |type| node_classifications_map(type) end.join('|') end # Helper to map classifications def node_classifications_map(value) return value unless node_classifications_maping.key?(value) node_classifications_maping[value] end def node_classifications_maping self.class::CLASSIFICATION_MAPS end end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems