class YARD::Handlers::Chef::ResourceActionHandler
Handles actions in custom resources and LWRPs
Public Instance Methods
action_hash(nodoc)
click to toggle source
Creates the hash to initialize the single resource property object
@return [Hash] the hash to initialize the property in the resource code object
# File lib/yard-chefdoc/handlers/resource_action.rb, line 21 def action_hash(nodoc) { identifier: statement[1][0].source.to_s[1..-1], source: statement.source, docstring: nodoc ? '' : statement.docstring, line: statement.line } end
process()
click to toggle source
# File lib/yard-chefdoc/handlers/resource_action.rb, line 10 def process resource_obj = ChefObject.register(filename, :resource, statement.file) docstring_is_header = (statement.docstring == resource_obj.header) resource_obj.add_action action_hash(docstring_is_header) end