Sha256: 5582c3c48c8b06e3dba29ede7a6f963a7a0e8d5fa6a589cc19171a672da807ea

Contents?: true

Size: 584 Bytes

Versions: 7

Compression:

Stored size: 584 Bytes

Contents

# frozen_string_literal: true

module Pennyworth
  module CLI
    module Actions
      # Handles the GitHub action.
      class GitHub
        def initialize processor: Processor.for_projects, container: Container
          @processor = processor
          @container = container
        end

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

        private

        attr_reader :processor, :container

        def logger = container[__method__]
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pennyworth-12.3.1 lib/pennyworth/cli/actions/git_hub.rb
pennyworth-12.3.0 lib/pennyworth/cli/actions/git_hub.rb
pennyworth-12.2.0 lib/pennyworth/cli/actions/git_hub.rb
pennyworth-12.1.0 lib/pennyworth/cli/actions/git_hub.rb
pennyworth-12.0.2 lib/pennyworth/cli/actions/git_hub.rb
pennyworth-12.0.1 lib/pennyworth/cli/actions/git_hub.rb
pennyworth-12.0.0 lib/pennyworth/cli/actions/git_hub.rb