Sha256: cc2ca03ee993a5179b6610d4eaaa68c8799f3c58a0b4e6e0221c461d5bdd140e
Contents?: true
Size: 1001 Bytes
Versions: 23
Compression:
Stored size: 1001 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
23 entries across 23 versions & 1 rubygems