Class: Avm::Instances::Process

Inherits:
Object
  • Object
show all
Defined in:
lib/avm/instances/process.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.default_idSymbol

Returns:

  • (Symbol)


10
11
12
# File 'lib/avm/instances/process.rb', line 10

def default_id
  name.demodulize.underscore.to_sym
end

Instance Method Details

#on_disabled(&block) ⇒ Object



20
21
22
23
24
25
26
27
28
# File 'lib/avm/instances/process.rb', line 20

def on_disabled(&block)
  previous_enabled = enabled?
  begin
    disable if previous_enabled
    block.call
  ensure
    enable if previous_enabled
  end
end