Class: Exa::Process

Inherits:
Object
  • Object
show all
Defined in:
lib/exa.rb

Direct Known Subclasses

Copier, Deleter

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title) ⇒ Process

Returns a new instance of Process.



7
8
9
# File 'lib/exa.rb', line 7

def initialize(title)
  @title = title
end

Class Method Details

.tableObject



25
26
27
# File 'lib/exa.rb', line 25

def self.table
  @table ||= []
end

Instance Method Details

#registerObject



11
12
13
# File 'lib/exa.rb', line 11

def register
  Process.table += [ self ]
end

#run!Object



19
20
21
22
23
# File 'lib/exa.rb', line 19

def run!
  register
  perform!
  unregister
end

#unregisterObject



15
16
17
# File 'lib/exa.rb', line 15

def unregister
  Process.table -= [ self ]
end