Class: Toys::SourceSpec::Base
- Inherits:
-
Object
- Object
- Toys::SourceSpec::Base
- Defined in:
- core-docs/toys/source_spec.rb
Overview
The base class of a source spec, holding the attributes common to every kind, and implementing equality.
Do not instantiate this class directly. Use one of the factory methods such as path.
Defined in the toys-core gem
Instance Attribute Summary collapse
-
#context_directory ⇒ String?
readonly
The context directory for tools loaded from this source, or nil if the source does not dictate a context directory.
-
#source_name ⇒ String?
readonly
The user-visible name for tools loaded from this source, or
nilto generate a default at resolution time.
Instance Method Summary collapse
-
#==(other) ⇒ boolean
(also: #eql?)
Source specs compare by value.
- #hash ⇒ Integer
Instance Attribute Details
#context_directory ⇒ String? (readonly)
The context directory for tools loaded from this source, or nil if the source does not dictate a context directory.
166 167 168 |
# File 'core-docs/toys/source_spec.rb', line 166 def context_directory @context_directory end |
#source_name ⇒ String? (readonly)
The user-visible name for tools loaded from this source, or nil to
generate a default at resolution time.
174 175 176 |
# File 'core-docs/toys/source_spec.rb', line 174 def source_name @source_name end |
Instance Method Details
#==(other) ⇒ boolean Also known as: eql?
Source specs compare by value. Specs of different kinds are never equal, even if their common attributes match.
183 184 185 |
# File 'core-docs/toys/source_spec.rb', line 183 def ==(other) # Source available in the toys-core gem end |
#hash ⇒ Integer
191 192 193 |
# File 'core-docs/toys/source_spec.rb', line 191 def hash # Source available in the toys-core gem end |