Module: ServiceActor::Playable::ClassMethods
- Defined in:
- lib/service_actor/playable.rb
Instance Method Summary collapse
- #alias_input(**options) ⇒ Object
- #inherited(child) ⇒ Object
- #play(*actors, **options) ⇒ Object
- #play_actors ⇒ Object
Instance Method Details
#alias_input(**options) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/service_actor/playable.rb', line 24 def alias_input(**) .each_key do |new| ServiceActor::ArgumentsValidator.validate_origin_name( new, origin: :alias ) end lambda do |actor| .each do |new, original| define_alias_input(actor, new, original) end end end |
#inherited(child) ⇒ Object
42 43 44 45 46 |
# File 'lib/service_actor/playable.rb', line 42 def inherited(child) super child.play_actors.concat(play_actors) end |
#play(*actors, **options) ⇒ Object
20 21 22 |
# File 'lib/service_actor/playable.rb', line 20 def play(*actors, **) play_actors.push(actors: actors, **) end |
#play_actors ⇒ Object
38 39 40 |
# File 'lib/service_actor/playable.rb', line 38 def play_actors @play_actors ||= [] end |