Class: Toys::Utils::GitCache::RepoInfo
- Inherits:
-
Object
- Object
- Toys::Utils::GitCache::RepoInfo
- 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
-
#base_dir ⇒ String
readonly
The base directory of this git repository's cache entry.
-
#last_accessed ⇒ Time?
readonly
The last time any cached data from this repo was accessed, or
nilif the information is unavailable. -
#remote ⇒ String
readonly
The git remote, usually a file system path or URL.
Instance Method Summary collapse
-
#<=>(other) ⇒ Integer
Comparison function.
-
#refs(ref: nil) ⇒ Array<RefInfo>
A list of git refs (branches, tags, shas) that have been accessed from this repo.
-
#sources(sha: nil, git_path: nil) ⇒ Array<SourceInfo>
A list of shared source files and directories accessed for this repo.
-
#to_h ⇒ Hash
Convert this RepoInfo to a hash suitable for JSON output.
Instance Attribute Details
#base_dir ⇒ String (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.
196 197 198 |
# File 'core-docs/toys/utils/git_cache.rb', line 196 def base_dir @base_dir end |
#last_accessed ⇒ Time? (readonly)
The last time any cached data from this repo was accessed, or nil
if the information is unavailable.
211 212 213 |
# File 'core-docs/toys/utils/git_cache.rb', line 211 def last_accessed @last_accessed end |
#remote ⇒ String (readonly)
The git remote, usually a file system path or URL.
203 204 205 |
# File 'core-docs/toys/utils/git_cache.rb', line 203 def remote @remote end |
Instance Method Details
#<=>(other) ⇒ Integer
Comparison function
254 255 256 |
# File 'core-docs/toys/utils/git_cache.rb', line 254 def <=>(other) # Source available in the toys-core gem end |
#refs(ref: nil) ⇒ Array<RefInfo>
A list of git refs (branches, tags, shas) that have been accessed from this repo.
221 222 223 |
# File 'core-docs/toys/utils/git_cache.rb', line 221 def refs(ref: nil) # Source available in the toys-core gem end |
#sources(sha: nil, git_path: nil) ⇒ Array<SourceInfo>
A list of shared source files and directories accessed for this repo.
235 236 237 |
# File 'core-docs/toys/utils/git_cache.rb', line 235 def sources(sha: nil, git_path: nil) # Source available in the toys-core gem end |
#to_h ⇒ Hash
Convert this RepoInfo to a hash suitable for JSON output
244 245 246 |
# File 'core-docs/toys/utils/git_cache.rb', line 244 def to_h # Source available in the toys-core gem end |