class PoisePython::Resources::PythonExecute::Provider

The default provider for `python_execute`.

@see Resource @provides python_execute

Private Instance Methods

command() click to toggle source

Command to pass to shell_out.

@return [String, Array<String>]

# File lib/poise_python/resources/python_execute.rb, line 57
def command
  if new_resource.command.is_a?(Array)
    [new_resource.python] + new_resource.command
  else
    "#{new_resource.python} #{new_resource.command}"
  end
end
environment() click to toggle source

Environment variables to pass to shell_out.

@return [Hash]

# File lib/poise_python/resources/python_execute.rb, line 68
def environment
  if new_resource.parent_python
    environment = new_resource.parent_python.python_environment
    if new_resource.environment
      environment = environment.merge(new_resource.environment)
    end
    environment
  else
    new_resource.environment
  end
end