Class: Reline::Key

Inherits:
Struct
  • Object
show all
Defined in:
lib/reline.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#charObject

Returns the value of attribute char

Returns:

  • (Object)

    the current value of char



21
22
23
# File 'lib/reline.rb', line 21

def char
  @char
end

#combined_charObject

Returns the value of attribute combined_char

Returns:

  • (Object)

    the current value of combined_char



21
22
23
# File 'lib/reline.rb', line 21

def combined_char
  @combined_char
end

#with_metaObject

Returns the value of attribute with_meta

Returns:

  • (Object)

    the current value of with_meta



21
22
23
# File 'lib/reline.rb', line 21

def with_meta
  @with_meta
end

Instance Method Details

#match?(sym) ⇒ Boolean

For dialog_proc ‘key.match?(dialog.name)`

Returns:

  • (Boolean)


23
24
25
# File 'lib/reline.rb', line 23

def match?(sym)
  combined_char.is_a?(Symbol) && combined_char == sym
end