gm-notepad 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +0,0 @@
1
- module Gm
2
- module Notepad
3
- DEFAULT_SHELL_PROMPT = "🗒".freeze
4
- DEFAULT_COLUMN_DELIMITER = "|".freeze
5
- end
6
- end
@@ -1,36 +0,0 @@
1
- require 'gm/notepad/configuration'
2
- module Gm
3
- module Notepad
4
- # Responsible for recording entries and then dumping them accordingly.
5
- class Pad
6
- Notepad::Configuration.init!(target: self, from_config: [:table_registry, :renderer, :input_processor]) do
7
- open!
8
- end
9
-
10
- def process(input:)
11
- input_processor.process(input: input) do |*args|
12
- renderer.call(*args)
13
- end
14
- end
15
-
16
- def close!
17
- renderer.close!
18
- end
19
-
20
- private
21
-
22
- def open!
23
- renderer.call("Welcome to gm-notepad. type \"?\" for help.", to_interactive: true, to_output: false)
24
- return unless config.report_config
25
- lines = ["# Configuration Parameters:"]
26
- config.each_pair do |key, value|
27
- lines << "# config[#{key.inspect}] = #{value.inspect}"
28
- end
29
- # When running :list_tables by default I don't want to report
30
- # that to the output buffer.
31
- to_output = !config.list_tables
32
- renderer.call(lines, to_interactive: true, to_output: to_output)
33
- end
34
- end
35
- end
36
- end