Class: Toys::Utils::GitCache::RepoInfo

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
core-docs/toys/utils/git_cache.rb

Overview

Defined in the toys-core gem

Information about a remote git repository in the cache.

This object is returned from #repo_info.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#base_dirString (readonly)

The base directory of this git repository's cache entry. This directory contains all cached data related to this repo. Deleting it effectively removes the repo from the cache.

Returns:

  • (String)


58
59
60
# File 'core-docs/toys/utils/git_cache.rb', line 58

def base_dir
  @base_dir
end

#last_accessedTime? (readonly)

The last time any cached data from this repo was accessed, or nil if the information is unavailable.

Returns:

  • (Time, nil)


73
74
75
# File 'core-docs/toys/utils/git_cache.rb', line 73

def last_accessed
  @last_accessed
end

#refsArray<RefInfo> (readonly)

A list of git refs (branches, tags, shas) that have been accessed from this repo.

Returns:



81
82
83
# File 'core-docs/toys/utils/git_cache.rb', line 81

def refs
  @refs
end

#remoteString (readonly)

The git remote, usually a file system path or URL.

Returns:

  • (String)


65
66
67
# File 'core-docs/toys/utils/git_cache.rb', line 65

def remote
  @remote
end

#sourcesArray<SourceInfo> (readonly)

A list of shared source files and directories accessed for this repo.

Returns:



88
89
90
# File 'core-docs/toys/utils/git_cache.rb', line 88

def sources
  @sources
end

Instance Method Details

#<=>(other) ⇒ Integer

Comparison function

Parameters:

Returns:

  • (Integer)


105
106
107
# File 'core-docs/toys/utils/git_cache.rb', line 105

def <=>(other)
  # Source available in the toys-core gem
end

#to_hHash

Convert this RepoInfo to a hash suitable for JSON output

Returns:

  • (Hash)


95
96
97
# File 'core-docs/toys/utils/git_cache.rb', line 95

def to_h
  # Source available in the toys-core gem
end