Module: ServiceActor::Failable

Defined in:
lib/service_actor/failable.rb

Overview

Adds the ‘fail_on` DSL to actors. This allows you to call `.result` and get back a failed actor instead of raising an exception.

class ApplicationActor < Actor
  fail_on ServiceActor::ArgumentError
end

Defined Under Namespace

Modules: ClassMethods, PrependedMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



11
12
13
14
# File 'lib/service_actor/failable.rb', line 11

def included(base)
  base.extend(ClassMethods)
  base.prepend(PrependedMethods)
end