Class: LearnTest::Dependencies::CSharp

Inherits:
LearnTest::Dependency show all
Defined in:
lib/learn_test/dependencies/csharp.rb

Instance Attribute Summary

Attributes inherited from LearnTest::Dependency

#options

Instance Method Summary collapse

Methods inherited from LearnTest::Dependency

#execute, #initialize, #mac?, #print_installing, #run_install, #win?

Constructor Details

This class inherits a constructor from LearnTest::Dependency

Instance Method Details

#die(message) ⇒ Object



18
19
20
21
# File 'lib/learn_test/dependencies/csharp.rb', line 18

def die(message)
  puts message
  exit
end

#installObject



14
15
16
# File 'lib/learn_test/dependencies/csharp.rb', line 14

def install
  die('Please install the .NET core from https://www.microsoft.com/net/core')
end

#missing?Boolean

Returns:

  • (Boolean)


6
7
8
9
10
11
12
# File 'lib/learn_test/dependencies/csharp.rb', line 6

def missing?
  if win?
    `where dotnet`.empty?
  else
    `which dotnet`.empty?
  end
end