ephemeral 2.3.0 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/ephemeral.gemspec +2 -2
- data/lib/ephemeral/base.rb +6 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0364683142294b930dd2777c14492c7f4645d14
|
4
|
+
data.tar.gz: e1ec89a7b3666ecec286fcde3f0701a3a883a893
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3068d7e2c1ea70c3e1c064c24f9975ca58c64ae997caa9bb8c959a8f50191c26f8b01cc46fad64acdb3a1015af8f13c52a1c8e903121594212546b2dce6bcbc
|
7
|
+
data.tar.gz: a138ebf76f702508b6fb4087a28c5593a952a9d1d28ecbeb4c681dc7ababdbdb644eeea4a4437af706677b990c60c09ce72ba6f71d056f3a64aa8b9da5d2b0ef
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.3.
|
1
|
+
2.3.1
|
data/ephemeral.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: ephemeral 2.3.
|
5
|
+
# stub: ephemeral 2.3.1 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "ephemeral"
|
9
|
-
s.version = "2.3.
|
9
|
+
s.version = "2.3.1"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
data/lib/ephemeral/base.rb
CHANGED
@@ -79,12 +79,17 @@ module Ephemeral
|
|
79
79
|
class_variable_get("@@objects")
|
80
80
|
end
|
81
81
|
|
82
|
+
def where(args={})
|
83
|
+
results = args.inject([]) {|a, (k, v)| a << objects.select {|o| o.send(k) == v[0]} }.flatten
|
84
|
+
Ephemeral::Collection.new(name, results)
|
85
|
+
end
|
86
|
+
|
82
87
|
def attach_scopes
|
83
88
|
scopes.each do |k, v|
|
84
89
|
if v.is_a?(Proc)
|
85
90
|
define_singleton_method(k, v)
|
86
91
|
else
|
87
|
-
define_singleton_method k, lambda {
|
92
|
+
define_singleton_method k, lambda { v }
|
88
93
|
end
|
89
94
|
end
|
90
95
|
end
|