[chef] "::Chef.Recipe.send(:include, ...)" versus "include ..." ??


Chronological Thread 
  • From: Ringo De Smet < >
  • To: Chef Users < >
  • Subject: [chef] "::Chef.Recipe.send(:include, ...)" versus "include ..." ??
  • Date: Thu, 26 May 2011 15:27:06 +0200
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=w+wjxVp8mRkK/D3iOFSQVGBEvI7cNMnb9K3ob/ieBa4KhTDvglFpIUaz8QkfJMlRrs 2DdNxHCW2MF0Mk/0PAclJ5argn/K9F5j82JZbZC+bo5GhFaPuCikIze9odjkapeSvrsy nCGw7gTpIfEX/B2S+Peq0z6cI0ofrPADR3Iwg=

Hello,

While investigating the setup of some cookbooks, I bumped into this line:

https://github.com/opscode/cookbooks/blob/master/mysql/recipes/server.rb#L20

Can someone explain me why the meta-level invocation is used here
instead of just a direct invocation?

So

::Chef::Recipe.send(:include, Opscode::OpenSSL::Password)

instead of

include Opscode::OpenSSL::Password


Cheers,

Ringo



Archive powered by MHonArc 2.6.16.

§