Sha256: 3c8ac34a3c4c5932f1acb549ceaabfdea0889482da822c3eb1789f4a9728327d
Contents?: true
Size: 462 Bytes
Versions: 5
Compression:
Stored size: 462 Bytes
Contents
module Ghit class HttpsGlobals attr_reader :url, :author, :repository def initialize remote @remote = remote @url = extract_url @author = extract_author @repository = extract_repository_name end private def extract_url @remote.split[-2] end def extract_author @remote.split('/')[-2] end def extract_repository_name extract_url.split('/')[-1] end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
ghit-0.2.4 | lib/ghit/https_globals.rb |
ghit-0.2.3 | lib/ghit/https_globals.rb |
ghit-0.2.2 | lib/ghit/https_globals.rb |
ghit-0.2.1 | lib/ghit/https_globals.rb |
ghit-0.2.0 | lib/ghit/https_globals.rb |