Sha256: 597d1aa9bf45ee342b3c163be89c1f8132b264976cd4b4207b273dea13d3582b

Contents?: true

Size: 438 Bytes

Versions: 1

Compression:

Stored size: 438 Bytes

Contents

module CliTemplate
  class Git
    class << self
      def user_name
        sh "git config --get user.name"
      end

      def user_email
        sh "git config --get user.email"
      end

      def sh(command)
        puts "=> #{command}"
        stdout = `#{command}`
        out = stdout.strip
        puts "stdout #{stdout.inspect}"
        puts "out #{out.inspect}"
        return out if !out&.empty?
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cli-template-4.0.1 lib/cli_template/git.rb