Class: TTK::Strategies::SignalCmd

Inherits:
Cmd show all
Includes:
Concrete
Defined in:
lib/ttk/strategies/SignalCmd.rb

Constant Summary collapse

@@signal_names =
nil

Instance Attribute Summary

Attributes inherited from CmdBase

#my_exit

Attributes inherited from Strategy

#status, #symtbl

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from CmdBase

#initialize

Methods inherited from IOBased

#initialize, #stream, #stream_class=

Methods inherited from Strategy

#abort, #assign, #clean_instance_variables, #display_unexpected_exc, #display_unexpected_synflow_exc, #fail, #initialize, #initialize_flow_factory, #pass, #raise_error, #reject, #run, #running?, #skip, #skip_if_cached, #strategy, #strategy=, #symbols=, #testify, #timeout=, #to_s, #wclass=

Constructor Details

This class inherits a constructor from TTK::Strategies::CmdBase

Class Method Details

.signal_name(status) ⇒ Object



58
59
60
61
62
63
64
65
66
67
# File 'lib/ttk/strategies/SignalCmd.rb', line 58

def SignalCmd.signal_name ( status )
  signal = status - 128
  if @@signal_names.nil?
    @@signal_names = { }
    Signal.list.each do |key, value|
      @@signal_names[value] = key
    end
  end
  @@signal_names[signal]
end

Instance Method Details

#signal=(signal_name) ⇒ Object



69
70
71
72
# File 'lib/ttk/strategies/SignalCmd.rb', line 69

def signal= ( signal_name )
  @signal = signal_name
  @signaled = true
end