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

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

Overview

Handles the GitHub user action.

Instance Method Summary collapse

Constructor Details

#initialize(processor: Processor.for_projects) ⇒ User

Returns a new instance of User.



19
20
21
22
# File 'lib/pennyworth/cli/actions/git_hub/user.rb', line 19

def initialize(processor: Processor.for_projects, **)
  super(**)
  @processor = processor
end

Instance Method Details

#call(handle = default) ⇒ Object



24
# File 'lib/pennyworth/cli/actions/git_hub/user.rb', line 24

def call(handle = default) = io.puts processor.call("users/#{handle}").to_json