Class: AsdfDiscover::SearchResult

Inherits:
Object
  • Object
show all
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

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

Returns:

  • (Boolean)


23
24
25
# File 'lib/asdf_discover/search_result.rb', line 23

def any?
  @results.any?
end

#conflictsObject



15
16
17
# File 'lib/asdf_discover/search_result.rb', line 15

def conflicts
  @conflicts ||= find_conflicts
end

#consistent?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/asdf_discover/search_result.rb', line 11

def consistent?
  conflicts.none?
end

#tool_versionsObject



19
20
21
# File 'lib/asdf_discover/search_result.rb', line 19

def tool_versions
  @tool_versions ||= collect_tool_versions
end