Class: GitLeft::KeyParser

Inherits:
Object
  • Object
show all
Defined in:
lib/git_left/key_parser.rb

Instance Method Summary collapse

Constructor Details

#initialize(input) ⇒ KeyParser

Returns a new instance of KeyParser.



3
4
5
# File 'lib/git_left/key_parser.rb', line 3

def initialize(input)
  @input = input
end

Instance Method Details

#actionObject



7
8
9
10
11
12
13
14
15
16
# File 'lib/git_left/key_parser.rb', line 7

def action
  case @input
  when "h" 
    :delete
  when "l"
    :skip
  else
    :quit
  end
end