advanced 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 65afbbcb3725f8de370cb12364ce11445a4b2180
4
- data.tar.gz: a7af9898058816118e0a2c17000de8127421deef
3
+ metadata.gz: 724d8cb29889df2f6de2afe41f73cb9e561e1289
4
+ data.tar.gz: 48c4f5887dcf0bdf1c6f283f83f00563bb44c549
5
5
  SHA512:
6
- metadata.gz: 1e6173e22bcfcd7af9e6c3f83b15a8b5ec99a7ab046c285348461ab281a07e50252f4ff63b8b92cb60dca5f5d62d00bdfe8a3980eb123065f07a3116e39284f3
7
- data.tar.gz: 50097e33a3d6287efceefcc44d8d3c9de04cb28d100ae3578d4edaf9cf883c2154d168ec4678653d9bb43386dba9422ff2db2866e1b8e2f13ab6cc74d6b86620
6
+ metadata.gz: 5725b13768e2bf2f4fa7adbfb3c940709de00a0968fd66f7552a3804db63f0f9ee64531b9bd647d8f5cef3d79d6fa1cb7c453aab8ba0904e22c8fc430705bb32
7
+ data.tar.gz: 134cbb8a9e80be41ae76ce7c88dd33b4cf816e94bd11fdc2c8f96347a0c7e2ed5d7b215906bb8f56e0522366ff2ef68d1eabe9667bf0097fa948748bc65a7db5
@@ -14,15 +14,27 @@ module Advanced
14
14
  end
15
15
  end
16
16
 
17
- def where_lt(param, column: param)
18
- define_search param, [param] do |value|
19
- where(arel_table[column].lt(value))
20
- end
17
+ def where_lt(*args)
18
+ where_arel(:lt, *args)
21
19
  end
22
20
 
23
- def where_gt(param, column: param)
21
+ def where_gt(*args)
22
+ where_arel(:gt, *args)
23
+ end
24
+
25
+ def where_lteq(*args)
26
+ where_arel(:lteq, *args)
27
+ end
28
+
29
+ def where_gteq(*args)
30
+ where_arel(:gteq, *args)
31
+ end
32
+
33
+ private
34
+
35
+ def where_arel(meth, param, column: param)
24
36
  define_search param, [param] do |value|
25
- where(arel_table[column].gt(value))
37
+ where(arel_table[column].send(meth, value))
26
38
  end
27
39
  end
28
40
  end
@@ -1,3 +1,3 @@
1
1
  module Advanced
2
- VERSION = '0.1.3'
2
+ VERSION = '0.1.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: advanced
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ray Zane