needs_resources 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,12 +5,17 @@ module NeedsResources
5
5
  class TopLevelResources
6
6
 
7
7
  include Singleton
8
+ include Enumerable
8
9
  include ResourceContainer
9
10
 
10
11
  def add_default(name, args={})
11
12
  defaults[name.to_sym] = args
12
13
  end
13
14
 
15
+ def each(&block)
16
+ resources.each(&block)
17
+ end
18
+
14
19
  private
15
20
 
16
21
  def defaults
@@ -1,3 +1,3 @@
1
1
  module NeedsResources
2
- VERSION = '0.2.0'
2
+ VERSION = '0.3.0'
3
3
  end
@@ -26,6 +26,12 @@ module NeedsResources
26
26
  TopLevelResources.instance.missing_resources
27
27
  end
28
28
 
29
+ extend Enumerable
30
+
31
+ def self.each(&block)
32
+ TopLevelResources.instance.each(&block)
33
+ end
34
+
29
35
  end
30
36
 
31
37
  Dir[File.expand_path('../needs_resources/**/*.rb', __FILE__)].sort.each do |f|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: needs_resources
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-10-29 00:00:00.000000000 Z
12
+ date: 2013-10-31 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Ruby gem to provide lightweight inversion of control type resources for
15
15
  an application