Class: Sprinkle::Installers::FreebsdPkg

Inherits:
Installer
  • Object
show all
Defined in:
lib/sprinkle/installers/freebsd_pkg.rb

Overview

FreeBSD Package Installer

The Pkg package installer installs FreeBSD packages.

Example Usage

Installing the magic_beans package.

package :magic_beans do
  freebsd_pkg 'magic_beans'
end

You may also specify multiple packages as an array:

package :magic_beans do
  freebsd_pkg %w(magic_beans magic_sauce)
end

Instance Attribute Summary collapse

Attributes inherited from Installer

#delivery, #options, #package, #post, #pre

Attributes included from Configurable

#delivery

Instance Method Summary collapse

Methods inherited from Installer

#process

Methods included from Configurable

#assert_delivery, #defaults, #method_missing, #option?

Constructor Details

#initialize(parent, packages, &block) ⇒ FreebsdPkg

:nodoc:



23
24
25
26
27
# File 'lib/sprinkle/installers/freebsd_pkg.rb', line 23

def initialize(parent, packages, &block) #:nodoc:
  super parent, &block
  packages = [packages] unless packages.is_a? Array
  @packages = packages
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Sprinkle::Configurable

Instance Attribute Details

#packagesObject

:nodoc:



21
22
23
# File 'lib/sprinkle/installers/freebsd_pkg.rb', line 21

def packages
  @packages
end