class Pluggaloid::Subscriber
Attributes
accepted_hash[R]
Public Class Methods
new(event, *specs, **kwrest, &callback)
click to toggle source
Args¶ ↑
- event
-
監視するEventのインスタンス
- name:
-
名前(String | nil)
- slug:
-
イベントリスナスラッグ(Symbol | nil)
- tags:
-
Pluggaloid::HandlerTag|Array リスナのタグ
- &callback
-
コールバック
Calls superclass method
Pluggaloid::Handler::new
# File lib/pluggaloid/subscriber.rb, line 13 def initialize(event, *specs, **kwrest, &callback) raise Pluggaloid::UndefinedStreamIndexError, 'To call subscribe(%{event}), it must define prototype arguments include `Pluggaloid::STREAM\'.' % {event: event.name} unless event.stream_index super(event, **kwrest) @callback = callback @accepted_hash = @event.argument_hash(specs, nil) event.add_listener(self) end
Public Instance Methods
call(*args)
click to toggle source