plucky 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/plucky.rb +1 -0
- data/lib/plucky/criteria_hash.rb +1 -0
- data/lib/plucky/extensions.rb +15 -0
- data/lib/plucky/options_hash.rb +1 -0
- data/lib/plucky/query.rb +1 -0
- data/lib/plucky/version.rb +2 -1
- metadata +5 -4
data/lib/plucky.rb
CHANGED
data/lib/plucky/criteria_hash.rb
CHANGED
data/lib/plucky/extensions.rb
CHANGED
@@ -1,9 +1,24 @@
|
|
1
|
+
# encoding: UTF-8
|
1
2
|
class SymbolOperator
|
3
|
+
include Comparable
|
4
|
+
|
2
5
|
attr_reader :field, :operator
|
3
6
|
|
4
7
|
def initialize(field, operator, options={})
|
5
8
|
@field, @operator = field, operator
|
6
9
|
end unless method_defined?(:initialize)
|
10
|
+
|
11
|
+
def <=>(other)
|
12
|
+
if field == other.field
|
13
|
+
operator <=> other.operator
|
14
|
+
else
|
15
|
+
field.to_s <=> other.field.to_s
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def ==(other)
|
20
|
+
field == other.field && operator == other.operator
|
21
|
+
end
|
7
22
|
end
|
8
23
|
|
9
24
|
class Symbol
|
data/lib/plucky/options_hash.rb
CHANGED
data/lib/plucky/query.rb
CHANGED
data/lib/plucky/version.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 2
|
9
|
+
version: 0.1.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- John Nunemaker
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-05-
|
17
|
+
date: 2010-05-19 00:00:00 -04:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -27,7 +27,8 @@ dependencies:
|
|
27
27
|
segments:
|
28
28
|
- 1
|
29
29
|
- 0
|
30
|
-
|
30
|
+
- 1
|
31
|
+
version: 1.0.1
|
31
32
|
type: :runtime
|
32
33
|
version_requirements: *id001
|
33
34
|
- !ruby/object:Gem::Dependency
|