Sha256: 838b1af36deaa1546da964e4459def9079a74e6fb0b170d569e114356e0356af

Contents?: true

Size: 451 Bytes

Versions: 5

Compression:

Stored size: 451 Bytes

Contents

module Ghit
  class Globals
    def initialize
      @remote = Ghit::RemoteExtracter.extract!
      @globals = if http_remote?
        Ghit::HttpsGlobals.new @remote
      else
        Ghit::SshGlobals.new @remote
      end
    end

    def url
      @globals.url
    end

    def author
      @globals.author
    end

    def repository
      @globals.repository
    end

    private

    def http_remote?
      @remote =~ /https?/
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ghit-0.2.4 lib/ghit/globals.rb
ghit-0.2.3 lib/ghit/globals.rb
ghit-0.2.2 lib/ghit/globals.rb
ghit-0.2.1 lib/ghit/globals.rb
ghit-0.2.0 lib/ghit/globals.rb