エントリーの編集
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
Benchmarking Ruby Dispatch Strategies - avdi.codes
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
Benchmarking Ruby Dispatch Strategies - avdi.codes
Let’s say we’re dispatching events to listener objects. Events look like this: Event = Struct.new... Let’s say we’re dispatching events to listener objects. Events look like this: Event = Struct.new(:name, :source, :args) Events should be routed to different handler methods based on the name of the event. For instance, when an object is sent the #call message with an :accepted event: listener.call(Event[:accepted, obj]) …then it should be dispatched to the #handle_accepted method, as if the liste