Class: PoiseRuby::RubyProviders::ChefRuby

Inherits:
Base
  • Object
show all
Defined in:
lib/poise_ruby/ruby_providers/chef.rb

Overview

Inversion provider for the ruby_runtime resource to use whatever Ruby is currently running, generally Chef's omnibus-d Ruby.

Since:

  • 2.0.0

Provides:

  • chef

Instance Method Summary collapse

Instance Method Details

#action_install

This method returns an undefined value.

The install action for the ruby_runtime resource.

Since:

  • 2.0.0



34
35
36
# File 'lib/poise_ruby/ruby_providers/chef.rb', line 34

def action_install
  # No-op, already installed!
end

#action_uninstall

This method returns an undefined value.

The uninstall action for the ruby_runtime resource.

Raises:

Since:

  • 2.0.0



41
42
43
# File 'lib/poise_ruby/ruby_providers/chef.rb', line 41

def action_uninstall
  raise PoiseRuby::Error.new("You cannot uninstall Chef's Ruby.")
end

#ruby_binaryString

The path to the running Ruby binary as determined via RbConfig.

Returns:

  • (String)

Since:

  • 2.0.0



48
49
50
# File 'lib/poise_ruby/ruby_providers/chef.rb', line 48

def ruby_binary
  Gem.ruby
end