Sha256: 577e1ca43ec043c613f6f635ceddaa38ad3ab26f19dbb9fdb0305bbafa11e8f0

Contents?: true

Size: 846 Bytes

Versions: 5

Compression:

Stored size: 846 Bytes

Contents

require 'chef/provisioning/action_handler'

class Chef
module Provisioning
  class AddPrefixActionHandler
    extend Forwardable

    def initialize(action_handler, prefix)
      @action_handler = action_handler
      @prefix = prefix
    end

    attr_reader :action_handler
    attr_reader :prefix

    def_delegators :@action_handler, :should_perform_actions, :updated!, :open_stream, :host_node

    def report_progress(description)
      action_handler.report_progress(Array(description).flatten.map { |d| "#{prefix}#{d}" })
    end

    def performed_action(description)
      action_handler.performed_action(Array(description).flatten.map { |d| "#{prefix}#{d}" })
    end

    def perform_action(description, &block)
      action_handler.perform_action(Array(description).flatten.map { |d| "#{prefix}#{d}" }, &block)
    end
  end
end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
chef-provisioning-0.16 lib/chef/provisioning/add_prefix_action_handler.rb
chef-provisioning-0.15.3 lib/chef/provisioning/add_prefix_action_handler.rb
chef-provisioning-0.15.2 lib/chef/provisioning/add_prefix_action_handler.rb
chef-provisioning-0.15.1 lib/chef/provisioning/add_prefix_action_handler.rb
chef-provisioning-0.15 lib/chef/provisioning/add_prefix_action_handler.rb