depalma 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
File without changes
data/Rakefile CHANGED
@@ -17,7 +17,7 @@ end
17
17
  # depalma.gemspec
18
18
  Gem::Specification.new do |s|
19
19
  s.name = %q{depalma}
20
- s.version = "0.0.0"
20
+ s.version = "0.1.1"
21
21
 
22
22
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
23
23
  s.authors = ["Christopher Rankin"]
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{depalma}
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Christopher Rankin"]
12
- s.date = %q{2010-01-10}
12
+ s.date = %q{2010-01-11}
13
13
  s.description = %q{Configure simple dispatch rules and have data dispatched over a group of receivers.}
14
14
  s.email = %q{rankin.devon@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -20,6 +20,7 @@ Gem::Specification.new do |s|
20
20
  "Rakefile",
21
21
  "VERSION",
22
22
  "depalma.gemspec",
23
+ "lib/depalma.rb",
23
24
  "lib/dispatch_rule.rb",
24
25
  "lib/dispatch_unit.rb",
25
26
  "lib/dispatcher.rb"
File without changes
File without changes
File without changes
@@ -24,7 +24,7 @@ class Dispatcher
24
24
 
25
25
  # dispatch_algorithm
26
26
  #---------------------------------------------------------------------------
27
- def dispatch_algorithm
27
+ def dispatch_algorithm(data)
28
28
  raise NotImplementedError, 'Subclass Dispatcher and define your own "dispatch_algorithm" method.'
29
29
  end
30
30
 
@@ -44,8 +44,8 @@ class Dispatcher
44
44
  # dispatch
45
45
  #---------------------------------------------------------------------------
46
46
  def dispatch
47
- @rule_list.each { |rule| rule.run(self.unit_list) }
48
- self.dispatch_algorithm
47
+ data = @rule_list.map { |rule| rule.run(self.unit_list) }
48
+ self.dispatch_algorithm(data)
49
49
  end
50
50
 
51
51
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: depalma
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Rankin
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-10 00:00:00 -05:00
12
+ date: 2010-01-11 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -26,6 +26,7 @@ files:
26
26
  - Rakefile
27
27
  - VERSION
28
28
  - depalma.gemspec
29
+ - lib/depalma.rb
29
30
  - lib/dispatch_rule.rb
30
31
  - lib/dispatch_unit.rb
31
32
  - lib/dispatcher.rb