Class: AsdfDiscover::Searchers::DotRubyVersion

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

Overview

Searches in .ruby-version

Constant Summary collapse

RUBY_VERSION_FILE =
".ruby-version".freeze

Instance Method Summary collapse

Instance Method Details

#callObject



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

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

  version = File.read(RUBY_VERSION_FILE).chomp

  Found.new("ruby", version, RUBY_VERSION_FILE)
end