Class: AsdfDiscover::Searchers::DotNodeVersion

Inherits:
Object
  • Object
show all
Defined in:
lib/asdf_discover/searchers/dot_node_version.rb

Overview

Searches in .node-version

Constant Summary collapse

NODE_VERSION =
".node-version".freeze

Instance Method Summary collapse

Instance Method Details

#callObject



7
8
9
10
11
12
13
# File 'lib/asdf_discover/searchers/dot_node_version.rb', line 7

def call
  return NotFound unless File.exist?(NODE_VERSION)

  version = File.read(NODE_VERSION).chomp

  Found.new("nodejs", version, NODE_VERSION)
end