Sha256: 24dd307451172b0234c26ab8faf6261a0fa4b122edc21562cb8bf361b93e49c6
Contents?: true
Size: 460 Bytes
Versions: 7
Compression:
Stored size: 460 Bytes
Contents
class Trailblazer::Operation module Policy def self.Guard(proc, name: :default, &block) Policy.step( Guard.build(proc), name: name ) end module Guard def self.build(callable) option = Trailblazer::Option::KW(callable) # this gets wrapped in a Operation::Result object. ->( (options, *), circuit_args ) do Result.new(!!option.call(options, circuit_args), {}) end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems