Sha256: 0806963f972754613bafc81a51e2008088ce1216aaefe60a9cc60e00d4d43703

Contents?: true

Size: 577 Bytes

Versions: 3

Compression:

Stored size: 577 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

# vim: ft=ruby
require "bundler/setup"
require "dry/cli"
require_relative '../base'
require 'awesome_print'
require 'json'

module Githuh
  module CLI
    module Commands
      module User
        class Info < Base
          desc "Print user information"

          def call(**opts)
            super(**opts)
            puts JSON.pretty_generate(client.user.to_hash)
          end
        end
      end

      register "user", aliases: ["u"] do |prefix|
        prefix.register "info", User::Info
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
githuh-0.2.1 lib/githuh/cli/commands/user/info.rb
githuh-0.2.0 lib/githuh/cli/commands/user/info.rb
githuh-0.1.2 lib/githuh/cli/commands/user/info.rb