Sha256: b0034c29b67ef9206f8d9647cf6a0288327d1c303b4b006335206a178a4e80e5

Contents?: true

Size: 441 Bytes

Versions: 34

Compression:

Stored size: 441 Bytes

Contents

# frozen_string_literal: true

module Pennyworth
  module Loaders
    module System
      # Loads an array of signal records.
      class Signals
        def initialize list: Signal.list, model: Models::System::Signal
          @list = list
          @model = model
        end

        def call(_omit = nil) = list.map { |name, number| model[number:, name:] }

        private

        attr_reader :list, :model
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
pennyworth-15.4.1 lib/pennyworth/loaders/system/signals.rb
pennyworth-15.4.0 lib/pennyworth/loaders/system/signals.rb
pennyworth-15.3.0 lib/pennyworth/loaders/system/signals.rb
pennyworth-15.2.0 lib/pennyworth/loaders/system/signals.rb
pennyworth-15.1.1 lib/pennyworth/loaders/system/signals.rb
pennyworth-15.1.0 lib/pennyworth/loaders/system/signals.rb
pennyworth-15.0.3 lib/pennyworth/loaders/system/signals.rb
pennyworth-15.0.2 lib/pennyworth/loaders/system/signals.rb
pennyworth-15.0.1 lib/pennyworth/loaders/system/signals.rb
pennyworth-15.0.0 lib/pennyworth/loaders/system/signals.rb
pennyworth-14.3.0 lib/pennyworth/loaders/system/signals.rb
pennyworth-14.2.1 lib/pennyworth/loaders/system/signals.rb
pennyworth-14.2.0 lib/pennyworth/loaders/system/signals.rb
pennyworth-14.1.2 lib/pennyworth/loaders/system/signals.rb
pennyworth-14.1.1 lib/pennyworth/loaders/system/signals.rb
pennyworth-14.1.0 lib/pennyworth/loaders/system/signals.rb
pennyworth-14.0.0 lib/pennyworth/loaders/system/signals.rb
pennyworth-13.8.0 lib/pennyworth/loaders/system/signals.rb
pennyworth-13.7.0 lib/pennyworth/loaders/system/signals.rb
pennyworth-13.6.0 lib/pennyworth/loaders/system/signals.rb