ask-agent 0.24.0 → 0.24.1
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/ask/agent/definition.rb +10 -2
- data/lib/ask/agent/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e5268e3474f109d7471749692a535a89b266e5a9d10c20499a565087500eaee8
|
|
4
|
+
data.tar.gz: 24fc0068d51f1eedc2e0d6f427234db468db375e915a4383533086993dab8b5d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8dddca135834b42108d217fc09a121a4fc4fd4ad44da326849b9654f30ba393bc115b44a3bc756433a7cbb8bd1b729d02dc246feb540e6f0ff39dc2aff1e56ad
|
|
7
|
+
data.tar.gz: 5cde0691f9aa8bd6723c20344211c50cc18e15ffdf392d97710896d4752b8343c583faab5de7e4156e261049676dbe06e2136162a8d10d1b48e9ae3e174f7786
|
data/lib/ask/agent/definition.rb
CHANGED
|
@@ -27,10 +27,18 @@ module Ask
|
|
|
27
27
|
|
|
28
28
|
class << self
|
|
29
29
|
# All subclasses that have been loaded, in definition order.
|
|
30
|
-
|
|
30
|
+
# Reads from Definition itself so intermediate base classes
|
|
31
|
+
# (e.g. ApplicationAgent) report the same registry.
|
|
32
|
+
def subclasses
|
|
33
|
+
Definition.instance_variable_get(:@subclasses) || []
|
|
34
|
+
end
|
|
31
35
|
|
|
32
36
|
def inherited(subclass)
|
|
33
|
-
|
|
37
|
+
# Track on Definition itself, not self — inherited fires with the
|
|
38
|
+
# immediate parent as receiver, so an intermediate base class
|
|
39
|
+
# (e.g. an ApplicationAgent in a Rails app) would otherwise have a
|
|
40
|
+
# nil @subclasses ivar.
|
|
41
|
+
Definition.subclasses << subclass
|
|
34
42
|
subclass.instance_variable_set(:@_config, { tools: [] })
|
|
35
43
|
|
|
36
44
|
# Auto-detect the directory from the file where this class is defined
|
data/lib/ask/agent/version.rb
CHANGED