Module: Rapid::Services::Requests::HandlerBundle

Included in:
Baps::Requests::Handlers
Defined in:
lib/ury_rapid/services/requests/handler_bundle.rb

Overview

Convenience module for handler bundles

HandlerBundle can be included by modules that contain request handlers, to allow a DSL-esque style of describing them.

Instance Method Summary collapse

Instance Method Details

#handler(name, *targets, &block) ⇒ Object

Constructs a new handler


14
15
16
# File 'lib/ury_rapid/services/requests/handler_bundle.rb', line 14

def handler(name, *targets, &block)
  handler_with_class(Handler, name, *targets, &block)
end

#player_handler(name, *targets, &block) ⇒ Object

Constructs a new player handler


19
20
21
# File 'lib/ury_rapid/services/requests/handler_bundle.rb', line 19

def player_handler(name, *targets, &block)
  handler_with_class(PlayerHandler, name, *targets, &block)
end

#playlist_handler(name, *targets, &block) ⇒ Object

Constructs a new playlist handler


24
25
26
# File 'lib/ury_rapid/services/requests/handler_bundle.rb', line 24

def playlist_handler(name, *targets, &block)
  handler_with_class(PlaylistHandler, name, *targets, &block)
end