Skip to content

Instantly share code, notes, and snippets.

@powdahound
Created May 30, 2011 20:51
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 powdahound/999441 to your computer and use it in GitHub Desktop.
Save powdahound/999441 to your computer and use it in GitHub Desktop.
Module Foo
Module Bar
def Bar.get_blah
# in my case, get_blah actually does a bunch of databag fetching and generates a nice Hash, but access to the node object is what matters here
return node[:blah]
end
end
end
# Current
b = node[:blah]
# What I want (so I don't have to copy my code into multiple recipes)
b = Foo::Bar.get_blah()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment