Module: PoisePython::PythonCommandMixin::Resource

Defined in:
lib/poise_python/python_command_mixin.rb

Overview

Mixin for resources which run Python commands.

Since:

  • 1.0.0

Instance Method Summary collapse

Instance Method Details

#virtualenv(name)

This method returns an undefined value.

Wrapper for setting the parent to be a virtualenv.

Parameters:

  • name (String)

    Name of the virtualenv resource.

Since:

  • 1.0.0



36
37
38
39
40
41
42
# File 'lib/poise_python/python_command_mixin.rb', line 36

def virtualenv(name)
  if name.is_a?(PoisePython::Resources::PythonVirtualenv::Resource)
    parent_python(name)
  else
    parent_python("python_virtualenv[#{name}]")
  end
end