Class: Yoda::Server::LifecycleHandler

Inherits:
Object
  • Object
show all
Includes:
Providers::ReportableProgress
Defined in:
lib/yoda/server/lifecycle_handler.rb

Overview

Handle

Defined Under Namespace

Classes: InitializationProgressReporter

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Providers::ReportableProgress

#in_progress

Constructor Details

#initialize(root_handler) ⇒ LifecycleHandler



16
17
18
19
# File 'lib/yoda/server/lifecycle_handler.rb', line 16

def initialize(root_handler)
  @root_handler = root_handler
  @notifier = root_handler.notifier
end

Instance Attribute Details

#notifierNotifier (readonly)



14
15
16
# File 'lib/yoda/server/lifecycle_handler.rb', line 14

def notifier
  @notifier
end

#sessionSession? (readonly)



11
12
13
# File 'lib/yoda/server/lifecycle_handler.rb', line 11

def session
  @session
end

Instance Method Details

#handle(method:, params:) ⇒ Object



29
30
31
# File 'lib/yoda/server/lifecycle_handler.rb', line 29

def handle(method:, params:)
  lifecycle_handlers[method].call(params)
end

#handle?(method) ⇒ true, false



23
24
25
# File 'lib/yoda/server/lifecycle_handler.rb', line 23

def handle?(method)
  lifecycle_handlers.key?(method)
end