Sha256: d193358dba9365c6fe7979f7eea1bc6fb9aa2b92e4af0ee3974a87fb507630cf

Contents?: true

Size: 565 Bytes

Versions: 6

Compression:

Stored size: 565 Bytes

Contents

# frozen_string_literal: true

module Pennyworth
  module Loaders
    # Loads projects from API requests for further processing.
    class Projects
      def self.for_git_hub = new(client: Integrations::GitHub::Client.new)

      def self.for_ruby_gems = new(client: Integrations::RubyGems::Client.new)

      def self.for_standard_gems = new(client: Integrations::StandardGems::Client.new)

      def initialize client:
        @client = client
      end

      def call(endpoint) = client.get(endpoint)

      private

      attr_reader :client
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
pennyworth-15.4.1 lib/pennyworth/loaders/projects.rb
pennyworth-15.4.0 lib/pennyworth/loaders/projects.rb
pennyworth-15.3.0 lib/pennyworth/loaders/projects.rb
pennyworth-15.2.0 lib/pennyworth/loaders/projects.rb
pennyworth-15.1.1 lib/pennyworth/loaders/projects.rb
pennyworth-15.1.0 lib/pennyworth/loaders/projects.rb