Class: Volt::TaskHandler
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(channel = nil, dispatcher = nil) ⇒ TaskHandler
10
11
12
13
|
# File 'lib/volt/tasks/task_handler.rb', line 10
def initialize(channel=nil, dispatcher=nil)
@channel = channel
@dispatcher = dispatcher
end
|
Class Method Details
.inherited(subclass) ⇒ Object
15
16
17
18
|
# File 'lib/volt/tasks/task_handler.rb', line 15
def self.inherited(subclass)
@subclasses ||= []
@subclasses << subclass
end
|
.known_handlers ⇒ Object
20
21
22
|
# File 'lib/volt/tasks/task_handler.rb', line 20
def self.known_handlers
@subclasses ||= []
end
|
.method_missing(name, *args, &block) ⇒ Object
On the backend, we proxy all class methods like we would on the front-end. This returns promises.
6
7
8
|
# File 'lib/volt/tasks/task_handler.rb', line 6
def self.method_missing(name, *args, &block)
$page.tasks.call(self.name, name, *args, &block)
end
|