Class: Toys::SourceInfo::Origin::Git

Inherits:
Base
  • Object
show all
Defined in:
core-docs/toys/source_info/origin.rb

Overview

The origin of a source read from a git repository.

Defined in the toys-core gem

Instance Attribute Summary collapse

Instance Attribute Details

#commit ⇒ String (readonly)

The git commit that the content was read at. This is the ref that was requested, which could be a SHA, a tag, or a branch name.

Returns:

  • (String)


71
72
73
# File 'core-docs/toys/source_info/origin.rb', line 71

def commit
  @commit
end

#path ⇒ String (readonly)

The path within the repository that was read. This is the path of the resolved source itself, and does not descend with child sources. It could be the empty string, meaning the root of the repository.

Returns:

  • (String)


80
81
82
# File 'core-docs/toys/source_info/origin.rb', line 80

def path
  @path
end

#remote ⇒ String (readonly)

The git remote that the content was fetched from.

Returns:

  • (String)


63
64
65
# File 'core-docs/toys/source_info/origin.rb', line 63

def remote
  @remote
end