Class: Toys::SourceInfo::Origin::Gem

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

Overview

The origin of a source read from a Ruby gem.

Note that within the Toys::SourceInfo::Origin module, the name Gem resolves to this class rather than to Ruby's ::Gem. Prefix references to the latter with ::.

Defined in the toys-core gem

Instance Attribute Summary collapse

Instance Attribute Details

#name ⇒ String (readonly)

The name of the gem that the content was read from.

Returns:

  • (String)


98
99
100
# File 'core-docs/toys/source_info/origin.rb', line 98

def name
  @name
end

#path ⇒ String (readonly)

The path within the gem that was read, including the gem's toys root directory. This is the path of the resolved source itself, and does not descend with child sources.

Returns:

  • (String)


114
115
116
# File 'core-docs/toys/source_info/origin.rb', line 114

def path
  @path
end

#version ⇒ ::Gem::Version (readonly)

The version of the gem that was activated.

Returns:

  • (::Gem::Version)


105
106
107
# File 'core-docs/toys/source_info/origin.rb', line 105

def version
  @version
end