Class: LearnTest::Dependencies::Java

Inherits:
LearnTest::Dependency show all
Defined in:
lib/learn_test/dependencies/java.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



16
17
18
19
# File 'lib/learn_test/dependencies/java.rb', line 16

def die(message)
  puts message
  exit
end

#installObject



12
13
14
# File 'lib/learn_test/dependencies/java.rb', line 12

def install
  die('Please install Java')
end

#missing?Boolean

Returns:

  • (Boolean)


4
5
6
7
8
9
10
# File 'lib/learn_test/dependencies/java.rb', line 4

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