Sha256: 780e4277252dd6109ce8bbce9407d48401d05a83756afd2c532493cebb4659ae

Contents?: true

Size: 523 Bytes

Versions: 7

Compression:

Stored size: 523 Bytes

Contents

module Cp8Cli
  class CurrentUser
    def initials
      git_user_name.parameterize(separator: " ").split.map(&:first).join
    end

    def trello_id
      trello_user.id
    end

    def github_login
      github_user.login
    end

    private

      def git_user_name
        @_git_user_name ||= Command.read("git config user.name")
      end

      def github_user
        @_github_user ||= Github::Base.client.user
      end

      def trello_user
        @_trello_user ||= Trello::Member.current
      end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
cp8_cli-4.2.1 lib/cp8_cli/current_user.rb
cp8_cli-4.2.0 lib/cp8_cli/current_user.rb
cp8_cli-4.1.3 lib/cp8_cli/current_user.rb
cp8_cli-4.1.2 lib/cp8_cli/current_user.rb
cp8_cli-4.1.1 lib/cp8_cli/current_user.rb
cp8_cli-4.1.0 lib/cp8_cli/current_user.rb
cp8_cli-4.0.1 lib/cp8_cli/current_user.rb