Sha256: 1d18d04686f9d41d5361d4d48a22b09055dcc83a10aa4d6845abae7a150fa6e1

Contents?: true

Size: 706 Bytes

Versions: 15

Compression:

Stored size: 706 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[:kernel]

          description "Specify user."

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

          default { Container[:configuration].git_hub_user }

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

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

          private

          attr_reader :processor
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
pennyworth-16.7.0 lib/pennyworth/cli/actions/git_hub/user.rb
pennyworth-16.5.0 lib/pennyworth/cli/actions/git_hub/user.rb
pennyworth-16.4.0 lib/pennyworth/cli/actions/git_hub/user.rb
pennyworth-16.3.0 lib/pennyworth/cli/actions/git_hub/user.rb
pennyworth-16.2.0 lib/pennyworth/cli/actions/git_hub/user.rb
pennyworth-16.1.0 lib/pennyworth/cli/actions/git_hub/user.rb
pennyworth-16.0.0 lib/pennyworth/cli/actions/git_hub/user.rb
pennyworth-15.4.1 lib/pennyworth/cli/actions/git_hub/user.rb
pennyworth-15.4.0 lib/pennyworth/cli/actions/git_hub/user.rb
pennyworth-15.3.0 lib/pennyworth/cli/actions/git_hub/user.rb
pennyworth-15.2.0 lib/pennyworth/cli/actions/git_hub/user.rb
pennyworth-15.1.1 lib/pennyworth/cli/actions/git_hub/user.rb
pennyworth-15.1.0 lib/pennyworth/cli/actions/git_hub/user.rb
pennyworth-15.0.3 lib/pennyworth/cli/actions/git_hub/user.rb
pennyworth-15.0.2 lib/pennyworth/cli/actions/git_hub/user.rb