Class: Pennyworth::Loaders::Projects

Inherits:
Object
  • Object
show all
Defined in:
lib/pennyworth/loaders/projects.rb

Overview

Loads projects from API requests for further processing.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Projects

Returns a new instance of Projects.



11
12
13
# File 'lib/pennyworth/loaders/projects.rb', line 11

def initialize client:
  @client = client
end

Class Method Details

.for_git_hubObject



7
# File 'lib/pennyworth/loaders/projects.rb', line 7

def self.for_git_hub = new(client: Integrations::GitHub::Client.new)

.for_ruby_gemsObject



9
# File 'lib/pennyworth/loaders/projects.rb', line 9

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

Instance Method Details

#call(endpoint) ⇒ Object



15
# File 'lib/pennyworth/loaders/projects.rb', line 15

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