Class: PoiseJavascript::Resources::JavascriptRuntime::Resource
- Inherits:
-
Chef::Resource
- Object
- Chef::Resource
- PoiseJavascript::Resources::JavascriptRuntime::Resource
- Defined in:
- lib/poise_javascript/resources/javascript_runtime.rb
Overview
A javascript_runtime
resource to manage Javascript installations.
Instance Attribute Summary collapse
-
#version ⇒ String
Version of Javascript to install.
Instance Method Summary collapse
-
#javascript_binary ⇒ String
The path to the
node
binary for this Javascript installation. -
#javascript_environment ⇒ Hash<String, String>
The environment variables for this Javascript installation.
-
#npm_binary ⇒ String
The path to the
npm
binary for this Javascript installation.
Instance Attribute Details
#version ⇒ String
Version of Javascript to install. This is generally a NodeJS version but because of io.js there are shenanigans.
46 |
# File 'lib/poise_javascript/resources/javascript_runtime.rb', line 46 attribute(:version, kind_of: String, name_attribute: true) |
Instance Method Details
#javascript_binary ⇒ String
The path to the node
binary for this Javascript installation. This is
an output property.
54 55 56 |
# File 'lib/poise_javascript/resources/javascript_runtime.rb', line 54 def javascript_binary provider_for_action(:javascript_binary).javascript_binary end |
#javascript_environment ⇒ Hash<String, String>
The environment variables for this Javascript installation. This is an output property.
66 67 68 |
# File 'lib/poise_javascript/resources/javascript_runtime.rb', line 66 def javascript_environment provider_for_action(:javascript_environment).javascript_environment end |
#npm_binary ⇒ String
The path to the npm
binary for this Javascript installation. This is
an output property. Can raise an exception if NPM is not supported for
this runtime.
77 78 79 |
# File 'lib/poise_javascript/resources/javascript_runtime.rb', line 77 def npm_binary provider_for_action(:npm_binary).npm_binary end |