metricky 0.7.4 → 0.7.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/metricky/base.rb +9 -0
- data/lib/metricky/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: 54becc08e11727ef77a77175dd2039f34451e53fbd21df65cd9f041ed1b3177e
|
4
|
+
data.tar.gz: 8c99b91ae474c167102f58d7f080ad653abf65cb7f777fb0a00a2fe2ba03a731
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10dfa8257b5fae1e6169182f30f53800df54faa933e3daf73bb39382c2207c6a8c2f810a10b27b2e88b30249f2bc8d9865713c1c9deb190e678ac2f5c3bd7556
|
7
|
+
data.tar.gz: 2e203ea4e914c2aa3a6309a3e92bafa0604656dc8b9ebd47f299f1cc00d631d11b5f520e3d5da669d07e16392e1e1957b0112141f91737658d6fd357f96a14c4
|
data/lib/metricky/base.rb
CHANGED
@@ -100,9 +100,18 @@ module Metricky
|
|
100
100
|
else
|
101
101
|
raise TypeError, "#{type} is not a valid type."
|
102
102
|
end
|
103
|
+
if @query.is_a?(Hash)
|
104
|
+
@query.transform_values! { |value| format_value(value) }
|
105
|
+
else
|
106
|
+
@query = format_value(@query)
|
107
|
+
end
|
103
108
|
@query
|
104
109
|
end
|
105
110
|
|
111
|
+
def format_value(value)
|
112
|
+
value
|
113
|
+
end
|
114
|
+
|
106
115
|
def valid_type?
|
107
116
|
VALID_TYPES.include?(type.to_sym)
|
108
117
|
end
|
data/lib/metricky/version.rb
CHANGED