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

Inherits:
Base
  • Object
show all
Defined in:
lib/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 ::.

Instance Attribute Summary collapse

Instance Attribute Details

#nameString (readonly)

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

Returns:

  • (String)


181
182
183
# File 'lib/toys/source_info/origin.rb', line 181

def name
  @name
end

#pathString (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)


197
198
199
# File 'lib/toys/source_info/origin.rb', line 197

def path
  @path
end

#version::Gem::Version (readonly)

The version of the gem that was activated.

Returns:

  • (::Gem::Version)


188
189
190
# File 'lib/toys/source_info/origin.rb', line 188

def version
  @version
end