Class: Sprinkle::Installers::InstallPackage

Inherits:
Installer show all
Defined in:
lib/sprinkle/installers/install_package.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Attributes inherited from Installer

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

Instance Method Summary collapse

Methods inherited from Installer

#announce, api, #commands_from_block, #defer, #escape_shell_arg, inherited, #install_sequence, #method_missing, #per_host?, #post_process, #process, subclasses, verify_api

Methods included from Sudo

#sudo?, #sudo_cmd, #sudo_stack

Methods included from Attributes

#defaults, #set_defaults

Constructor Details

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

:nodoc:


7
8
9
10
11
12
13
14
15
16
# File 'lib/sprinkle/installers/install_package.rb', line 7

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

  @packages = packages
end

Dynamic Method Handling

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

Instance Attribute Details

#packagesObject

:nodoc:


5
6
7
# File 'lib/sprinkle/installers/install_package.rb', line 5

def packages
  @packages
end