# frozen_string_literal: true module Cryptum # This plugin is used to Exit Cryptum Gracefully When the "x" Key is Pressed module Event module Exit # Supported Method Parameters:: # Cryptum::Event::Exit.gracefully( # ) public_class_method def self.gracefully(opts = {}) terminal_win = opts[:terminal_win] event_history = opts[:event_history] option_choice = opts[:option_choice] env = opts[:env] terminal_win.key_press_event.key_x = false Cryptum::UI::Exit.gracefully( which_self: self, event_history: event_history, option_choice: option_choice, env: env ) rescue StandardError => e raise e end # Display Usage for this Module public_class_method def self.help puts "USAGE: #{self}.gracefully() " end end end end