code_snippet_manager 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/code_snippet_manager/version.rb +1 -1
- data/lib/code_snippet_manager.rb +12 -17
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e42f34b5b8cbb39879b7f2657a84e4620480c651833defcbea27c8b92e3805a
|
4
|
+
data.tar.gz: c4170e6f676af45ebfa73c4c49d934294ed3c1d0bfd1c9cca2b86ba8814572aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f95cbdda7cda8f3b4ee7fbeda886d161a19d004104a32200837db6843e6c0f7f0ea08246f1dc5bb068c18baadf1e98c8b6a4c2e910ba5bdcb12d0b657ca92cf
|
7
|
+
data.tar.gz: 9fccdc47ff66a40682aa61e918573ba20e55d5fa087905ec81ef7c17672825a30e2d1a3bea589b52da8cd79ddc85bc47b6f71a997424aa4abcc0014d27376807
|
data/lib/code_snippet_manager.rb
CHANGED
@@ -1,27 +1,22 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative "code_snippet_manager/version"
|
4
|
+
require_relative "code_snippet_manager/configuration"
|
4
5
|
|
5
|
-
# Main module for the lib
|
6
6
|
module CodeSnippetManager
|
7
|
-
def self.
|
8
|
-
|
9
|
-
|
10
|
-
case choice
|
11
|
-
when :add
|
12
|
-
puts "add"
|
13
|
-
when :list
|
14
|
-
puts "list"
|
15
|
-
end
|
7
|
+
def self.included(base)
|
8
|
+
base.include Configuration
|
9
|
+
base.extend ClassMethods
|
16
10
|
end
|
17
11
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
prompt.select("Choose your action:") do |menu|
|
23
|
-
menu.choice name: "Add a new snippet", value: :add
|
24
|
-
menu.choice name: "List all snippets", value: :list
|
12
|
+
module ClassMethods
|
13
|
+
def init(&block)
|
14
|
+
config_instance = ConfigurationInstance.new
|
15
|
+
config_instance.instance_eval(&block)
|
25
16
|
end
|
26
17
|
end
|
27
18
|
end
|
19
|
+
|
20
|
+
class ConfigurationInstance
|
21
|
+
include CodeSnippetManager::Configuration
|
22
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: code_snippet_manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jovan-sremacki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-04-
|
11
|
+
date: 2024-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tty-prompt
|