Skip to content

Commit 8655ef1

Browse files
committed
Making supports work with an accessor
1 parent e27b232 commit 8655ef1

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

chef/lib/chef/resource.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class Resource
2525
include Chef::Mixin::CheckHelper
2626
include Chef::Mixin::ParamsValidate
2727

28-
attr_accessor :actions, :params, :provider, :updated, :allowed_actions, :collection, :cookbook_name, :recipe_name, :supports
28+
attr_accessor :actions, :params, :provider, :updated, :allowed_actions, :collection, :cookbook_name, :recipe_name
2929
attr_reader :resource_name, :source_line, :node
3030

3131
def initialize(name, collection=nil, node=nil)
@@ -49,6 +49,10 @@ def initialize(name, collection=nil, node=nil)
4949
@source_line = ::File.expand_path(@source_line) if @source_line
5050
end
5151

52+
def supports(args={})
53+
@supports = args
54+
end
55+
5256
def provider(arg=nil)
5357
set_or_return(
5458
:provider,

0 commit comments

Comments
 (0)