Class: Bhook::Workspaces

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/bhook/workspaces.rb

Instance Method Summary collapse

Constructor Details

#initializeWorkspaces

Returns a new instance of Workspaces.



9
10
11
# File 'lib/bhook/workspaces.rb', line 9

def initialize
  @workspaces = T.let([], T::Array[Bhook::Workspace])
end

Instance Method Details

#mount(workspace) ⇒ Object



14
15
16
# File 'lib/bhook/workspaces.rb', line 14

def mount(workspace)
  @workspaces << workspace
end

#process!Object



19
20
21
# File 'lib/bhook/workspaces.rb', line 19

def process!
  @workspaces.each(&:process!)
end

#watch!Object



24
25
26
27
# File 'lib/bhook/workspaces.rb', line 24

def watch!
  @workspaces.each(&:watch!)
  Kernel.sleep
end