Class: Reline::KeyActor::Base

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

Direct Known Subclasses

Emacs, ViCommand, ViInsert

Constant Summary collapse

MAPPING =
Array.new(256)

Instance Method Summary collapse

Constructor Details

#initializeBase

Returns a new instance of Base.



8
9
10
# File 'lib/reline/key_actor/base.rb', line 8

def initialize
  @default_key_bindings = {}
end

Instance Method Details

#default_key_bindingsObject



12
13
14
# File 'lib/reline/key_actor/base.rb', line 12

def default_key_bindings
  @default_key_bindings
end

#get_method(key) ⇒ Object



4
5
6
# File 'lib/reline/key_actor/base.rb', line 4

def get_method(key)
  self.class::MAPPING[key]
end

#reset_default_key_bindingsObject



16
17
18
# File 'lib/reline/key_actor/base.rb', line 16

def reset_default_key_bindings
  @default_key_bindings.clear
end