Class: AsdfDiscover::SearchResult
- Inherits:
-
Object
- Object
- AsdfDiscover::SearchResult
- Defined in:
- lib/asdf_discover/search_result.rb
Overview
Amalgamated results from Searchers. Contains the data required to display warnings and write the .tool-versions file.
Defined Under Namespace
Classes: Conflict
Instance Method Summary collapse
- #any? ⇒ Boolean
- #conflicts ⇒ Object
- #consistent? ⇒ Boolean
-
#initialize(results) ⇒ SearchResult
constructor
A new instance of SearchResult.
- #tool_versions ⇒ Object
Constructor Details
#initialize(results) ⇒ SearchResult
Returns a new instance of SearchResult.
7 8 9 |
# File 'lib/asdf_discover/search_result.rb', line 7 def initialize(results) @results = results end |
Instance Method Details
#any? ⇒ Boolean
23 24 25 |
# File 'lib/asdf_discover/search_result.rb', line 23 def any? @results.any? end |
#conflicts ⇒ Object
15 16 17 |
# File 'lib/asdf_discover/search_result.rb', line 15 def conflicts @conflicts ||= find_conflicts end |
#consistent? ⇒ Boolean
11 12 13 |
# File 'lib/asdf_discover/search_result.rb', line 11 def consistent? conflicts.none? end |
#tool_versions ⇒ Object
19 20 21 |
# File 'lib/asdf_discover/search_result.rb', line 19 def tool_versions @tool_versions ||= collect_tool_versions end |