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



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

def char
  @char
end

#combined_charObject

Returns the value of attribute combined_char

Returns:

  • (Object)

    the current value of combined_char



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

def combined_char
  @combined_char
end

#with_metaObject

Returns the value of attribute with_meta

Returns:

  • (Object)

    the current value of with_meta



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

def with_meta
  @with_meta
end

Instance Method Details

#match?(sym) ⇒ Boolean

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

Returns:

  • (Boolean)


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

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