Super keyword out of class context?

Here is this file, app.rb and it contains the following:

 def initialize(*args) super @action = :add end 

This is not inside the class. Why does he have a super keyword? File here .

+4
source share
1 answer

This file will be used to create the new Light resource class. Certain methods will be copied there without any changes. Thus, super makes sense because the newly created class inherits from Chef :: Resource.

Read more about Light Resources and Suppliers (LWRP)

+1
source

All Articles