Class: Pennyworth::Loaders::Projects
- Inherits:
-
Object
- Object
- Pennyworth::Loaders::Projects
- Defined in:
- lib/pennyworth/loaders/projects.rb
Overview
Loads projects from API requests for further processing.
Class Method Summary collapse
Instance Method Summary collapse
- #call(endpoint) ⇒ Object
-
#initialize(client:) ⇒ Projects
constructor
A new instance of Projects.
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_hub ⇒ Object
7 |
# File 'lib/pennyworth/loaders/projects.rb', line 7 def self.for_git_hub = new(client: Integrations::GitHub::Client.new) |
.for_ruby_gems ⇒ Object
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) |