emittance 1.0.0 → 1.1.0

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: 8a12d2ed09299f6ea551701fcbc1b80f2ffbf1d3
4
- data.tar.gz: b85e2d3a4e6d37e9a218b664fcf98a9a13537569
3
+ metadata.gz: bdfbafff04e9e3f13600cd866e8feceea7f0d5e3
4
+ data.tar.gz: 58a17c61fc1861ad40799d774c0423b11a1d1f8f
5
5
  SHA512:
6
- metadata.gz: 5341279075e93fa07f37afcdb735c2ea71ecf5d7f8b92b2c2418d05726721e6bba76821730bf8d1e00536753b9597889b4056f78568c5a920f89a60fe67b7930
7
- data.tar.gz: f3b593c4e00b366ca0dc60614a0756a27f384d10c358cb98ffa96e170dbc081c2624d6230c6d6150e8c41456755c50a3e178065c29e462a3566d00489342b66b
6
+ metadata.gz: 54f8e3827b60740b23a26d6edff782bd46bcb8d2f1144fd29548f7c17aec0402323311b2644d28e2f7520c437a6d3a40667be73edbbdbd2660f2d3ee5103e140
7
+ data.tar.gz: 8acf082bf58a7fe57d23e239ebfe283fe33a4888e9653783509079f2b2a7acfcedbcc551f5b657d9f498227285d22e10cfc9817ae82c30737fc55d35c90ad9c2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- emittance (1.0.0)
4
+ emittance (1.1.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -6,6 +6,8 @@ module Emittance
6
6
  # A collection proxy for registrations. Can include multiple key/value pairs.
7
7
  #
8
8
  class RegistrationCollectionProxy
9
+ include Enumerable
10
+
9
11
  # @param lookup_term the term initially used to lookup the registrations
10
12
  # @param mappings [Hash] the mappings of identifiers to their respective registrations
11
13
  def initialize(lookup_term, mappings)
@@ -13,12 +15,13 @@ module Emittance
13
15
  @mappings = mappings
14
16
  end
15
17
 
16
- # @param args args passed to +Array#each+
17
- # @param blk block passed to +Array#each+
18
18
  # @return [RegistrationCollectionProxy] self
19
- def each(*args, &blk)
20
- arrays.flatten.each(*args, &blk)
21
- self
19
+ def each
20
+ return enum_for(:each) unless block_given?
21
+
22
+ arrays.flatten.each do |registration|
23
+ yield registration
24
+ end
22
25
  end
23
26
 
24
27
  # @return [Boolean] true if there are no registrations at all, false otherwise
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Emittance
4
- VERSION = '1.0.0'
4
+ VERSION = '1.1.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: emittance
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tyler Guillen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-01-10 00:00:00.000000000 Z
11
+ date: 2018-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler