Class: Pennyworth::CLI::Actions::RubyGems

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

Overview

Handles the RubyGems action.

Instance Method Summary collapse

Constructor Details

#initialize(processor: Processor.for_gems, container: Container) ⇒ RubyGems

Returns a new instance of RubyGems.



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

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

Instance Method Details

#call(endpoint) ⇒ Object



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

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