Class: TTY::Reader::Key Private

Inherits:
Struct
  • Object
show all
Defined in:
lib/tty/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.



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

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



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

def ctrl
  @ctrl
end

#metaObject

Returns the value of attribute meta

Returns:

  • (Object)

    the current value of meta



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

def meta
  @meta
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



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

def name
  @name
end

#shiftObject

Returns the value of attribute shift

Returns:

  • (Object)

    the current value of shift



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

def shift
  @shift
end