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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f06df215d34c0b7b86bc1097de53f4c9fdd524ab
4
- data.tar.gz: 269b9359462a464c70be5c35df2b8a88cf94d3eb
3
+ metadata.gz: e0364683142294b930dd2777c14492c7f4645d14
4
+ data.tar.gz: e1ec89a7b3666ecec286fcde3f0701a3a883a893
5
5
  SHA512:
6
- metadata.gz: dd05de0085dea751196f01b31dd724a68bf97a2bb0e9b20f0ce274b97e07a03f2feee9c2b0671aea6af8fc3a8d21453b49fc79d686151d0b06b4bfdf2e696dd4
7
- data.tar.gz: dabdfd17688254f4af1d5fa586adb6f2db4647e7b404640245b9665a2681a80c6f0609efec84e58e71bd94425fe27c1f4d20fde8cfe4919133e4f1e85b453950
6
+ metadata.gz: d3068d7e2c1ea70c3e1c064c24f9975ca58c64ae997caa9bb8c959a8f50191c26f8b01cc46fad64acdb3a1015af8f13c52a1c8e903121594212546b2dce6bcbc
7
+ data.tar.gz: a138ebf76f702508b6fb4087a28c5593a952a9d1d28ecbeb4c681dc7ababdbdb644eeea4a4437af706677b990c60c09ce72ba6f71d056f3a64aa8b9da5d2b0ef
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.3.0
1
+ 2.3.1
@@ -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.0 ruby lib
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.0"
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"]
@@ -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 { self.execute_scope(k)}
92
+ define_singleton_method k, lambda { v }
88
93
  end
89
94
  end
90
95
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ephemeral
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Corey Ehmke