Module: ServiceActor::Valuable
- Defined in:
- lib/service_actor/valuable.rb
Overview
Adds the value method to actors. This allows you to call .value and get back the return value of that actor’s call method.
In the case of play actors, it will return the value of the final actor’s call method in the chain.
class MyActor < Actor
def call
"foo"
end
end
> MyActor.value
=> "foo"
Defined Under Namespace
Modules: ClassMethods, PrependedMethods
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
19 20 21 22 |
# File 'lib/service_actor/valuable.rb', line 19 def included(base) base.extend(ClassMethods) base.prepend(PrependedMethods) end |