Class: HistoryParserFactory
- Inherits:
-
Object
- Object
- HistoryParserFactory
- Defined in:
- lib/parser/history_parser_factory.rb
Overview
Simple parser to handling line items from the systems history file.
Class Method Summary collapse
Class Method Details
.create(input_shell: ENV['SHELL']) ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/parser/history_parser_factory.rb', line 10 def self.create(input_shell: ENV['SHELL']) case input_shell when ZSH_SHELL_PATH ZshHistoryParser.new when BASH_SHELL_PATH BashHistoryParser.new else raise UnknownShell end end |