class Ghit::Globals

Public Class Methods

new() click to toggle source
# File lib/ghit/globals.rb, line 3
def initialize
  @remote = Ghit::RemoteExtracter.extract!
  @globals = if http_remote?
    Ghit::HttpsGlobals.new @remote
  else
    Ghit::SshGlobals.new @remote
  end
end

Public Instance Methods

author() click to toggle source
# File lib/ghit/globals.rb, line 16
def author
  @globals.author
end
repository() click to toggle source
# File lib/ghit/globals.rb, line 20
def repository
  @globals.repository
end
url() click to toggle source
# File lib/ghit/globals.rb, line 12
def url
  @globals.url
end

Private Instance Methods

http_remote?() click to toggle source
# File lib/ghit/globals.rb, line 26
def http_remote?
  @remote =~ /https?/
end