The more I use this, the more I think it shouldn't be actual classes that define hooks, rather more simple "rspec-esque" blocks of code. For example:
class SampleHooks < Pokey
define_hook "Optional description" do |hook|
hook.interval = 10
hook.endpoint = "http://blarg.com/api/endpoint"
hook.http_method = :patch
hook.data do |data|
data.id = 1
data.something_else = "string"
end
end
define_hook do |hook|
hook.interval = 5
# etc
end
end
Then you could simplify define as many hooks as you wanted in any given file. I'll shoot for release in 0.3.0.
The more I use this, the more I think it shouldn't be actual classes that define hooks, rather more simple "rspec-esque" blocks of code. For example:
Then you could simplify define as many hooks as you wanted in any given file. I'll shoot for release in 0.3.0.