Sha256: 839d0399ae6d578392232202625b3196d416d0d7a34b04cc91c64b9afa3f560e

Contents?: true

Size: 543 Bytes

Versions: 3

Compression:

Stored size: 543 Bytes

Contents

# frozen_string_literal: true

module Pennyworth
  module CLI
    module Actions
      # Handles the RubyGems action.
      class RubyGems
        include Pennyworth::Import[:logger]

        def initialize(processor: Processor.for_gems, **)
          super(**)
          @processor = processor
        end

        def call endpoint
          processor.call(endpoint)
                   .to_json
                   .then { |json| logger.info { json } }
        end

        private

        attr_reader :processor
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
pennyworth-14.2.1 lib/pennyworth/cli/actions/ruby_gems.rb
pennyworth-14.2.0 lib/pennyworth/cli/actions/ruby_gems.rb
pennyworth-14.1.2 lib/pennyworth/cli/actions/ruby_gems.rb