Class: Reline::Key

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

Overview

EOF key: { char: nil, method_symbol: nil } Other key: { char: String, method_symbol: Symbol }

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



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

def char
  @char
end

#method_symbolObject

Returns the value of attribute method_symbol

Returns:

  • (Object)

    the current value of method_symbol



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

def method_symbol
  @method_symbol
end

#unused_booleanObject

Returns the value of attribute unused_boolean

Returns:

  • (Object)

    the current value of unused_boolean



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

def unused_boolean
  @unused_boolean
end

Instance Method Details

#match?(sym) ⇒ Boolean

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

Returns:

  • (Boolean)


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

def match?(sym)
  method_symbol && method_symbol == sym
end