Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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