Class: PhusionPassenger::Dependency

Inherits:
Object
  • Object
show all
Defined in:
lib/phusion_passenger/dependencies.rb

Overview

Represents a dependency software that Passenger requires. It’s used by the installer to check whether all dependencies are available. A Dependency object contains full information about a dependency, such as its name, code for detecting whether it is installed, and installation instructions for the current platform.

Defined Under Namespace

Classes: Result

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ Dependency

Returns a new instance of Dependency.



43
44
45
46
# File 'lib/phusion_passenger/dependencies.rb', line 43

def initialize(&block)
  @included_by = []
  @init_block = block
end

Instance Method Details

#checkObject



52
53
54
55
56
57
# File 'lib/phusion_passenger/dependencies.rb', line 52

def check
  call_init_block
  result = Result.new
  @checker.call(result)
  return result
end

#define_checker(&block) ⇒ Object



48
49
50
# File 'lib/phusion_passenger/dependencies.rb', line 48

def define_checker(&block)
  @checker = block
end