low_type 1.1.11 → 1.1.13
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/queries/file_query.rb +1 -13
- data/lib/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: 6f0cac83a3d18258da13254f3d293d0630a718d7c2640bc56974d9973b78b330
|
|
4
|
+
data.tar.gz: b6c8fda73a3ca4d6c6d2a5aa91015cd162641f42edce4c3b901e1c481f2152af
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b93f26a5ff5a22466aaa898201549205f3acef574488b887193a2c9fd0deef69894b679f4c966e01ac7fedc0326c69e694851bf0de9445f51922a7b6c12caa5f
|
|
7
|
+
data.tar.gz: f377e9f4f5bc85cb1e51e1a0cc3c36c0d6ac1b057da181341924377fb208208fa35bc27a1e5070ced94270fa46351c56c6d93dda9f08a21c69d913ae43d9b5b4
|
data/lib/queries/file_query.rb
CHANGED
|
@@ -6,24 +6,12 @@ module Low
|
|
|
6
6
|
class FileQuery
|
|
7
7
|
class << self
|
|
8
8
|
def file_path(klass:)
|
|
9
|
-
|
|
10
|
-
file_path = includer_line.split(':').first || ''
|
|
9
|
+
file_path = Object.const_source_location(klass.name).first
|
|
11
10
|
|
|
12
11
|
return file_path if File.exist?(file_path)
|
|
13
12
|
|
|
14
13
|
raise MissingFileError, "No file found at path '#{file_path}'"
|
|
15
14
|
end
|
|
16
|
-
|
|
17
|
-
private
|
|
18
|
-
|
|
19
|
-
def line_from_class(klass:)
|
|
20
|
-
class_name = klass.to_s.split(':').last # Also remove the module namespaces from the class.
|
|
21
|
-
caller.find { |callee| callee.end_with?("<class:#{class_name}>'") }
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
def line_from_include
|
|
25
|
-
caller.find { |callee| callee.end_with?("include'") }
|
|
26
|
-
end
|
|
27
15
|
end
|
|
28
16
|
end
|
|
29
17
|
end
|
data/lib/version.rb
CHANGED