Class: PhusionPassenger::AbstractInstaller

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

Overview

Abstract base class for text mode installers. Used by passenger-install-apache2-module and passenger-install-nginx-module.

Subclasses must at least implement the #install! method which handles the installation itself.

Usage:

installer = ConcereteInstallerClass.new(options...)
installer.start

Direct Known Subclasses

Standalone::RuntimeInstaller

Constant Summary collapse

PASSENGER_WEBSITE =
"http://www.modrails.com/"
PHUSION_WEBSITE =
"www.phusion.nl"

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ AbstractInstaller

Create an AbstractInstaller. All options will be stored as instance variables, for example:

installer = AbstractInstaller.new(:foo => "bar")
installer.instance_variable_get(:"@foo")   # => "bar"


54
55
56
57
58
# File 'lib/phusion_passenger/abstract_installer.rb', line 54

def initialize(options = {})
	options.each_pair do |key, value|
		instance_variable_set(:"@#{key}", value)
	end
end

Instance Method Details

#startObject

Start the installation by calling the #install! method.



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

def start
	before_install
	install!
ensure
	after_install
end