Class: TTY::Prompt::Reader::Key Private

Inherits:
Struct
  • Object
show all
Defined in:
lib/tty/prompt/reader/key_event.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Responsible for meta-data information about key pressed

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeKey

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Key.



10
11
12
# File 'lib/tty/prompt/reader/key_event.rb', line 10

def initialize(*)
  super(nil, false, false, false)
end

Instance Attribute Details

#ctrlObject

Returns the value of attribute ctrl

Returns:

  • (Object)

    the current value of ctrl



9
10
11
# File 'lib/tty/prompt/reader/key_event.rb', line 9

def ctrl
  @ctrl
end

#metaObject

Returns the value of attribute meta

Returns:

  • (Object)

    the current value of meta



9
10
11
# File 'lib/tty/prompt/reader/key_event.rb', line 9

def meta
  @meta
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



9
10
11
# File 'lib/tty/prompt/reader/key_event.rb', line 9

def name
  @name
end

#shiftObject

Returns the value of attribute shift

Returns:

  • (Object)

    the current value of shift



9
10
11
# File 'lib/tty/prompt/reader/key_event.rb', line 9

def shift
  @shift
end