Class: PoiseApplicationRuby::Resources::Ruby::Resource

Inherits:
PoiseRuby::Resources::RubyRuntime::Resource
  • Object
show all
Includes:
AppMixin
Defined in:
lib/poise_application_ruby/resources/ruby.rb

Overview

An application_ruby resource to manage Ruby runtimes inside an Application cookbook deployment.

Examples:

application '/app' do
  ruby '2'
end

Since:

  • 4.0.0

Instance Method Summary collapse

Instance Method Details

#after_createdObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Set this resource as the app_state's parent ruby.

Since:

  • 4.0.0



54
55
56
57
58
# File 'lib/poise_application_ruby/resources/ruby.rb', line 54

def after_created
  super.tap do |val|
    app_state_ruby(self)
  end
end

#gem_binary(*args, &block) ⇒ Object

Rebind the parent class #gem_binary instead of the one from RubyCommandMixin (by way of AppMixin)

Since:

  • 4.0.0



47
48
49
# File 'lib/poise_application_ruby/resources/ruby.rb', line 47

def gem_binary(*args, &block)
  self.class.superclass.instance_method(:gem_binary).bind(self).call(*args, &block)
end