arql 0.2.6 → 0.2.7
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/Gemfile.lock +1 -1
- data/lib/arql/definition.rb +18 -8
- data/lib/arql/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: 44604f0630f7b6308b9c53bf90b46bd9138b52fdec169baf46bf4e790adfc82b
|
|
4
|
+
data.tar.gz: 7efecc0c754d4f16eb31a19756de3d95a06d8d93440e480726d6df574827af13
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d795bedb12d2bf39bbb2b5e394373b545e35a542e00110708915fa57b5ca2248f5ed64ee975283d0a3a23e3e4ed201a560fc3ba78dac4085650d6eef486c7fdf
|
|
7
|
+
data.tar.gz: 07c6aacfcd46fe3361ebbf977c553c32aad792cb7cd40ebdb9803f0cb76b32ace4bb4326808dd4db2c61be2f6e3e98ec1ee85753ced7e73ee85f8d1f6ffaf10d
|
data/Gemfile.lock
CHANGED
data/lib/arql/definition.rb
CHANGED
|
@@ -107,10 +107,15 @@ module Arql
|
|
|
107
107
|
end
|
|
108
108
|
end.tap do |clazz|
|
|
109
109
|
Object.const_set(const_name, clazz).tap do |const|
|
|
110
|
-
const_name.gsub(/[a-z]*/, '').tap do |
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
110
|
+
const_name.gsub(/[a-z]*/, '').tap do |bare_abbr|
|
|
111
|
+
abbr_const = nil
|
|
112
|
+
9.times do |idx|
|
|
113
|
+
abbr = idx.zero? ? bare_abbr : "#{bare_abbr}#{idx+1}"
|
|
114
|
+
unless Object.const_defined?(abbr)
|
|
115
|
+
Object.const_set abbr, const
|
|
116
|
+
abbr_const = abbr
|
|
117
|
+
break
|
|
118
|
+
end
|
|
114
119
|
end
|
|
115
120
|
|
|
116
121
|
@@models << {
|
|
@@ -161,10 +166,15 @@ module Arql
|
|
|
161
166
|
end
|
|
162
167
|
end.tap do |clazz|
|
|
163
168
|
Object.const_set(const_name, clazz).tap do |const|
|
|
164
|
-
const_name.gsub(/[a-z]*/, '').tap do |
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
169
|
+
const_name.gsub(/[a-z]*/, '').tap do |bare_abbr|
|
|
170
|
+
abbr_const = nil
|
|
171
|
+
9.times do |idx|
|
|
172
|
+
abbr = idx.zero? ? bare_abbr : "#{bare_abbr}#{idx+1}"
|
|
173
|
+
unless Object.const_defined?(abbr)
|
|
174
|
+
Object.const_set abbr, const
|
|
175
|
+
abbr_const = abbr
|
|
176
|
+
break
|
|
177
|
+
end
|
|
168
178
|
end
|
|
169
179
|
|
|
170
180
|
@@models << {
|
data/lib/arql/version.rb
CHANGED