Module: Cryptum::Event::Exit

Defined in:
lib/cryptum/event/exit.rb

Overview

This Module is used to Exit Cryptum Gracefully When the “x” Key is Pressed

Class Method Summary collapse

Class Method Details

.gracefully(opts = {}) ⇒ Object

Supported Method Parameters

Cryptum::Event::Exit.gracefully( )



11
12
13
14
15
16
17
# File 'lib/cryptum/event/exit.rb', line 11

public_class_method def self.gracefully(opts = {})
  event_history = opts[:event_history]

  Cryptum::UI::Exit.gracefully(event_history: event_history)
rescue Interrupt, StandardError => e
  Cryptum::Log.append(level: :error, msg: e, which_self: self, event_history: event_history)
end

.helpObject

Display Usage for this Module



20
21
22
23
24
# File 'lib/cryptum/event/exit.rb', line 20

public_class_method def self.help
  puts "USAGE:
    #{self}.gracefully()
  "
end