Define DryRunnable#dry_run?

A dry-runnable Agent can use this method to decide if it should avoid
affecting unsandboxed resources, like calling an external API that
might change any state.
This commit is contained in:
Akinori MUSHA 2015-05-14 20:46:25 +09:00
parent 864152b871
commit 40d6192070

View file

@ -25,6 +25,10 @@ module DryRunnable
)
end
def dry_run?
is_a? Sandbox
end
module Sandbox
attr_accessor :results