How does one load functions from a library file into the load_current_value call in a custom resource? For the action block, I know you pull in the library with:
action_class do include My::Helper end
But the methods I’ve defined there throw an "undefined method " error when I try to use them in load_current_value.
load_current_value do var get_feed(parameter) end
In my case, I have a REST API that I hit to get the current value, so I wrote some nicely reusable methods that will do that. In the action block, this works great:
action :create do Chef::Log.info(get_feed(parameter)) end