Class: Reline::Key
- Inherits:
-
Struct
- Object
- Struct
- Reline::Key
- Defined in:
- lib/reline.rb
Instance Attribute Summary collapse
-
#char ⇒ Object
Returns the value of attribute char.
-
#combined_char ⇒ Object
Returns the value of attribute combined_char.
-
#with_meta ⇒ Object
Returns the value of attribute with_meta.
Instance Method Summary collapse
- #match?(other) ⇒ Boolean (also: #==)
Instance Attribute Details
#char ⇒ Object
Returns the value of attribute char
20 21 22 |
# File 'lib/reline.rb', line 20 def char @char end |
#combined_char ⇒ Object
Returns the value of attribute combined_char
20 21 22 |
# File 'lib/reline.rb', line 20 def combined_char @combined_char end |
#with_meta ⇒ Object
Returns the value of attribute with_meta
20 21 22 |
# File 'lib/reline.rb', line 20 def @with_meta end |
Instance Method Details
#match?(other) ⇒ Boolean Also known as: ==
21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/reline.rb', line 21 def match?(other) case other when Reline::Key (other.char.nil? or char.nil? or char == other.char) and (other.combined_char.nil? or combined_char.nil? or combined_char == other.combined_char) and (other..nil? or .nil? or == other.) when Integer, Symbol (combined_char and combined_char == other) or (combined_char.nil? and char and char == other) else false end end |