Skip to content

Instantly share code, notes, and snippets.

@garo
Created December 3, 2013 08:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save garo/7766014 to your computer and use it in GitHub Desktop.
Save garo/7766014 to your computer and use it in GitHub Desktop.
ruby_block "test" do
block do
# prints [:find_snapshot_id, :ec2, :instance_id, :instance_availability_zone]
Chef::Log.info("Opscode::Aws::Ec2.instance_methods(false) #{Opscode::Aws::Ec2.instance_methods(false)}")
# This throws "undefined method `ec2' for Opscode::Aws::Ec2:Module"
Chef::Log.info("ec2: #{Opscode::Aws::Ec2.ec2}")
# This throws undefined local variable or method `new_resource' for #<Object:0x0000000293b0a0>
ec2 = Object.new.extend(Opscode::Aws::Ec2).ec2
Chef::Log.info("ec2: #{ec2}")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment