Class: Sprinkle::Installers::Npm

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

Overview

Npm package Installed

Installs an npm module

Example Usage

package :magic_beans do
  npm 'grunt'
end

verify { has_npm 'grunt' }

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, package_name, &block) ⇒ Npm

:nodoc:



30
31
32
33
# File 'lib/sprinkle/installers/npm.rb', line 30

def initialize(parent, package_name, &block) #:nodoc:
  super parent, &block
  @package_name = package_name
end

Dynamic Method Handling

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

Instance Attribute Details

#package_nameObject

Returns the value of attribute package_name



16
17
18
# File 'lib/sprinkle/installers/npm.rb', line 16

def package_name
  @package_name
end