Sha256: 6ad2071b080fe30a91db400a4fbefb4dae23a22e71da5c65fb0a1b0e1be36fda
Contents?: true
Size: 691 Bytes
Versions: 43
Compression:
Stored size: 691 Bytes
Contents
# frozen_string_literal: true require "refinements/arrays" module Pennyworth module Loaders # Loads an array of encoding records. class Encodings using Refinements::Arrays def initialize encoding: Encoding, model: Models::Encoding @encoding = encoding @model = model end def call _omit = nil encoding.aliases .map { |_second, first| first } .uniq .sort .map do |first| model[name: first, aliases: encoding.find(first).names.sort.excluding(first)] end end private attr_reader :encoding, :model end end end
Version data entries
43 entries across 43 versions & 1 rubygems