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.



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

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

Instance Method Details

#checkObject



61
62
63
64
65
66
# File 'lib/phusion_passenger/dependencies.rb', line 61

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

#define_checker(&block) ⇒ Object



57
58
59
# File 'lib/phusion_passenger/dependencies.rb', line 57

def define_checker(&block)
	@checker = block
end