Class: Pennyworth::CLI::Actions::GitHub

Inherits:
Object
  • Object
show all
Defined in:
lib/pennyworth/cli/actions/git_hub.rb

Overview

Handles the GitHub action.

Instance Method Summary collapse

Constructor Details

#initialize(processor: Processor.for_projects, container: Container) ⇒ GitHub

Returns a new instance of GitHub.



8
9
10
11
# File 'lib/pennyworth/cli/actions/git_hub.rb', line 8

def initialize processor: Processor.for_projects, container: Container
  @processor = processor
  @container = container
end

Instance Method Details

#call(endpoint) ⇒ Object



13
14
15
16
17
# File 'lib/pennyworth/cli/actions/git_hub.rb', line 13

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