Sha256: 98da5b4b1b423be2af8e059f1b97a715bec52d83df99b7c22c50133ea45d7813

Contents?: true

Size: 686 Bytes

Versions: 8

Compression:

Stored size: 686 Bytes

Contents

# frozen_string_literal: true

require "sod"

module Pennyworth
  module CLI
    module Actions
      module GitHub
        # Handles the GitHub user action.
        class User < Sod::Action
          include Import[:io]

          description "Specify user."

          on %w[-u --user], argument: "[HANDLE]"

          default { Container[:settings].git_hub_user }

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

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

          private

          attr_reader :processor
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
pennyworth-17.8.0 lib/pennyworth/cli/actions/git_hub/user.rb
pennyworth-17.7.0 lib/pennyworth/cli/actions/git_hub/user.rb
pennyworth-17.6.0 lib/pennyworth/cli/actions/git_hub/user.rb
pennyworth-17.5.0 lib/pennyworth/cli/actions/git_hub/user.rb
pennyworth-17.4.1 lib/pennyworth/cli/actions/git_hub/user.rb
pennyworth-17.4.0 lib/pennyworth/cli/actions/git_hub/user.rb
pennyworth-17.3.0 lib/pennyworth/cli/actions/git_hub/user.rb
pennyworth-17.2.0 lib/pennyworth/cli/actions/git_hub/user.rb