Module: Spectre::Git

Defined in:
lib/spectre/git.rb

Defined Under Namespace

Classes: GitAccess

Constant Summary collapse

@@cfg =
{}
@@logger =
::Logger.new(STDOUT)
@@last_access =
nil

Class Method Summary collapse

Class Method Details

.git(name = nil, &block) ⇒ Object



157
158
159
160
161
162
163
164
# File 'lib/spectre/git.rb', line 157

def git name = nil, &block
  cfg = @@cfg[name] || {}

  cfg['url'] = name if not cfg['url']

  @@last_access = GitAccess.new(cfg, @@logger) if name
  @@last_access.instance_eval &block
end