Sha256: 5dc32f22e798d0d90be8caf00ef5b06cacc2c5174c9ed146ebdeb4777981d917

Contents?: true

Size: 1001 Bytes

Versions: 10

Compression:

Stored size: 1001 Bytes

Contents

# frozen_string_literal: true

module Cryptum
  module UI
    # This Class is Used to Detect Key Press Events
    class KeyPressEvent
      attr_accessor :key_c,
                    :key_g,
                    :key_r,
                    :key_u,
                    :key_w,
                    :key_x,
                    :key_ansi,
                    :key_down_arrow,
                    :key_end,
                    :key_enter,
                    :key_esc,
                    :key_home,
                    :key_page_down,
                    :key_page_up,
                    :key_tab,
                    :key_up_arrow

    rescue Interrupt
      # Exit Gracefully if CTRL+C is Pressed During Session
      Cryptum.exit_gracefully(which_self: self)
    rescue StandardError => e
      # Produce a Stacktrace for anything else
      Curses.close_screen
      raise e
    end

    # Display a List of Every UI Module

    public_class_method def self.help
      constants.sort
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
cryptum-0.0.381 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.380 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.379 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.378 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.377 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.376 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.375 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.374 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.373 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.372 lib/cryptum/ui/key_press_event.rb