Sha256: fa653ad5dc94a1cf473609b372338a0deeb416c2c3c1272d9891f7f2e4f3ad04

Contents?: true

Size: 736 Bytes

Versions: 9

Compression:

Stored size: 736 Bytes

Contents

# 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 = {})
        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

      # Display Usage for this Module
      public_class_method def self.help
        puts "USAGE:
          #{self}.gracefully()
        "
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
cryptum-0.0.397 lib/cryptum/event/exit.rb
cryptum-0.0.396 lib/cryptum/event/exit.rb
cryptum-0.0.395 lib/cryptum/event/exit.rb
cryptum-0.0.394 lib/cryptum/event/exit.rb
cryptum-0.0.393 lib/cryptum/event/exit.rb
cryptum-0.0.392 lib/cryptum/event/exit.rb
cryptum-0.0.389 lib/cryptum/event/exit.rb
cryptum-0.0.388 lib/cryptum/event/exit.rb
cryptum-0.0.387 lib/cryptum/event/exit.rb