class Armature::Repo

Public Class Methods

from_path(cache, path) click to toggle source
# File lib/armature/repo.rb, line 2
def self.from_path(cache, path)
  # Called from the cache; don't check for an existing repo
  self.new(cache, path)
end
new(cache, repo_dir) click to toggle source
# File lib/armature/repo.rb, line 7
def initialize(cache, repo_dir)
  @cache = cache
  @repo_dir = repo_dir
  @logger = Logging.logger[self]
  @url = nil
  flush_memory!

  @cache.register_repo(self)
end
type() click to toggle source

Generally these don't need to be overridden

# File lib/armature/repo.rb, line 36
def self.type
  self.name.split('::').last().downcase()
end

Public Instance Methods

check_out(ref) click to toggle source
# File lib/armature/repo.rb, line 23
def check_out(ref)
end
flush_memory!() click to toggle source
# File lib/armature/repo.rb, line 30
def flush_memory!
  @fresh = false
end
freshen() click to toggle source
# File lib/armature/repo.rb, line 48
def freshen
  if ! @fresh
    freshen!
    true
  else
    false
  end
end
freshen!() click to toggle source
# File lib/armature/repo.rb, line 26
def freshen!
  flush_memory!
end
to_s() click to toggle source
# File lib/armature/repo.rb, line 44
def to_s
  url()
end
type() click to toggle source
# File lib/armature/repo.rb, line 40
def type
  self.class.type()
end
url() click to toggle source

You may wish to override these methods

# File lib/armature/repo.rb, line 19
def url
  @url
end