Module: Poise::Helpers::LWRPPolyfill::Provider::LoadCurrentResource

Defined in:
lib/poise/helpers/lwrp_polyfill.rb

Overview

Since:

  • 1.0.0

Instance Method Summary collapse

Instance Method Details

#load_current_resourceObject

Since:

  • 1.0.0



133
134
135
136
137
138
139
140
# File 'lib/poise/helpers/lwrp_polyfill.rb', line 133

def load_current_resource
  @current_resource = if new_resource
    new_resource.class.new(new_resource.name, run_context)
  else
    # Better than nothing, subclass can overwrite anyway.
    Chef::Resource.new(nil, run_context)
  end
end