Class: Toys::SourceSpec::Gem
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
-
#default_confirm ⇒ nil, boolean
readonly
The default response for a confirmation prompt.
-
#name ⇒ String
readonly
The gem name.
-
#on_missing ⇒ nil, ...
readonly
What to do if the gem is not installed.
-
#path ⇒ String?
readonly
The path from the gem's toys directory, or
nilfor the entire toys directory. -
#toys_dir ⇒ String?
readonly
The name of the gem's toys directory, or
nilto use the default. -
#version ⇒ Array<String>
readonly
The version requirements.
Attributes inherited from Base
#context_directory, #source_name
Method Summary
Methods inherited from Base
Instance Attribute Details
#default_confirm ⇒ nil, boolean (readonly)
The default response for a confirmation prompt
468 469 470 |
# File 'lib/toys/source_spec.rb', line 468 def default_confirm @default_confirm end |
#name ⇒ String (readonly)
The gem name.
427 428 429 |
# File 'lib/toys/source_spec.rb', line 427 def name @name end |
#on_missing ⇒ nil, ... (readonly)
What to do if the gem is not installed.
460 461 462 |
# File 'lib/toys/source_spec.rb', line 460 def on_missing @on_missing end |
#path ⇒ String? (readonly)
The path from the gem's toys directory, or nil for the entire toys
directory.
443 444 445 |
# File 'lib/toys/source_spec.rb', line 443 def path @path end |
#toys_dir ⇒ String? (readonly)
The name of the gem's toys directory, or nil to use the default.
450 451 452 |
# File 'lib/toys/source_spec.rb', line 450 def toys_dir @toys_dir end |
#version ⇒ Array<String> (readonly)
The version requirements. Always an array, which is empty if any version is allowed.
435 436 437 |
# File 'lib/toys/source_spec.rb', line 435 def version @version end |