Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有这个文件,app.rb它包含以下内容:
app.rb
def initialize(*args) super @action = :add end
它不在课堂内。为什么会有super关键字?文件在这里。
super
该文件将用于创建一个新的“轻量级”资源类。定义的方法将被复制到那里而不做任何更改。所以super非常有意义,因为新生成的类将继承自 Chef::Resource。
查看有关轻量级资源和提供者 (LWRP)的更多信息