Class: Toys::Utils::GitCache::SourceInfo

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 shared source files provided from the cache.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#git_pathString (readonly)

The path within the git repo

Returns:

  • (String)


335
336
337
# File 'core-docs/toys/utils/git_cache.rb', line 335

def git_path
  @git_path
end

#last_accessedTime? (readonly)

The timestamp when this ref was last accessed

Returns:

  • (Time, nil)


349
350
351
# File 'core-docs/toys/utils/git_cache.rb', line 349

def last_accessed
  @last_accessed
end

#shaString (readonly)

The git sha the source comes from

Returns:

  • (String)


328
329
330
# File 'core-docs/toys/utils/git_cache.rb', line 328

def sha
  @sha
end

#sourceString (readonly)

The path to the source file or directory

Returns:

  • (String)


342
343
344
# File 'core-docs/toys/utils/git_cache.rb', line 342

def source
  @source
end

Instance Method Details

#<=>(other) ⇒ Integer

Comparison function

Parameters:

Returns:

  • (Integer)


366
367
368
# File 'core-docs/toys/utils/git_cache.rb', line 366

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

#to_hHash

Convert this SourceInfo to a hash suitable for JSON output

Returns:

  • (Hash)


356
357
358
# File 'core-docs/toys/utils/git_cache.rb', line 356

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