Class: AsdfDiscover::Searchers::Nvmrc

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

Overview

Searches in .nvmrc

Constant Summary collapse

NVMRC =
".nvmrc".freeze

Instance Method Summary collapse

Instance Method Details

#callObject



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

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

  version = File.read(NVMRC).chomp

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