Class: YARD::Handlers::Chef::ResourceResourceNameHandler

Inherits:
Base
  • Object
show all
Defined in:
lib/yard-chefdoc/handlers/resource_resource_name.rb

Overview

Handles the resource name in custom resources and LWRPs

Constant Summary

Constants included from CodeObjects::Chef

CodeObjects::Chef::VERSION

Instance Method Summary collapse

Methods inherited from Base

#cookbook, #filename, #name

Instance Method Details

#processObject



10
11
12
13
# File 'lib/yard-chefdoc/handlers/resource_resource_name.rb', line 10

def process
  resource_obj = ChefObject.register(filename, :resource, statement.file)
  resource_obj.resource_name = statement.parameters[0][0][0].source # Gets the first parameter as string
end