Sha256: 99ec438684f835f297c95a0279f95f12f55e3ef0790d5b04f7a8204398fc2329
Contents?: true
Size: 497 Bytes
Versions: 10
Compression:
Stored size: 497 Bytes
Contents
module Cp8Cli class Repo def self.current path = Command.read("git config --get remote.origin.url").match(/github.com[:\/](\S+\/\S+)\.git/)[1] new(path) end def initialize(path) @path = path end def shorthand "#{user}/#{name}" end def url "https://github.com/#{shorthand}" end def user path.split('/').first end private attr_reader :path def name path.split('/').last end end end
Version data entries
10 entries across 10 versions & 1 rubygems