Class: Toys::SourceSpec::Gem

Inherits:
Base
  • Object
show all
Defined in:
lib/toys/source_spec.rb

Overview

A spec for a source located in a gem.

Beware that within the Toys::SourceSpec namespace, the name Gem resolves to this class rather than to Ruby's ::Gem. Prefix references to the latter with ::, as the project's style rules already require.

Instance Attribute Summary collapse

Attributes inherited from Base

#context_directory, #source_name

Method Summary

Methods inherited from Base

#==, #hash

Instance Attribute Details

#nameString (readonly)

The gem name.

Returns:

  • (String)


401
402
403
# File 'lib/toys/source_spec.rb', line 401

def name
  @name
end

#pathString? (readonly)

The path from the gem's toys directory, or nil for the entire toys directory.

Returns:

  • (String, nil)


417
418
419
# File 'lib/toys/source_spec.rb', line 417

def path
  @path
end

#toys_dirString? (readonly)

The name of the gem's toys directory, or nil to use the default.

Returns:

  • (String, nil)


424
425
426
# File 'lib/toys/source_spec.rb', line 424

def toys_dir
  @toys_dir
end

#versionArray<String> (readonly)

The version requirements. Always an array, which is empty if any version is allowed.

Returns:

  • (Array<String>)


409
410
411
# File 'lib/toys/source_spec.rb', line 409

def version
  @version
end