plucky 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/plucky/query.rb +6 -1
- data/lib/plucky/version.rb +1 -1
- metadata +3 -3
data/lib/plucky/query.rb
CHANGED
@@ -13,7 +13,7 @@ module Plucky
|
|
13
13
|
attr_reader :criteria, :options, :collection
|
14
14
|
def_delegator :criteria, :simple?
|
15
15
|
def_delegator :options, :fields?
|
16
|
-
def_delegators :to_a, :each
|
16
|
+
def_delegators :to_a, :each, :include?
|
17
17
|
|
18
18
|
def initialize(collection, opts={})
|
19
19
|
@collection, @options, @criteria = collection, OptionsHash.new, CriteriaHash.new
|
@@ -135,6 +135,11 @@ module Plucky
|
|
135
135
|
count.zero?
|
136
136
|
end
|
137
137
|
|
138
|
+
def exists?(options={})
|
139
|
+
!count(options).zero?
|
140
|
+
end
|
141
|
+
alias :exist? :exists?
|
142
|
+
|
138
143
|
def to_a
|
139
144
|
all
|
140
145
|
end
|
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
|
- 3
|
8
|
-
-
|
9
|
-
version: 0.3.
|
8
|
+
- 1
|
9
|
+
version: 0.3.1
|
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-06-
|
17
|
+
date: 2010-06-17 00:00:00 -04:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|