i18n_scope 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/Rakefile +1 -1
  2. data/lib/i18n/scope.rb +7 -1
  3. metadata +3 -3
data/Rakefile CHANGED
@@ -45,7 +45,7 @@ spec = Gem::Specification.new do |s|
45
45
 
46
46
  # Change these as appropriate
47
47
  s.name = "i18n_scope"
48
- s.version = "0.1.0"
48
+ s.version = "0.1.1"
49
49
  s.summary = "Magic scoping for I18n"
50
50
  s.author = "Matthew Rudy Jacobs"
51
51
  s.email = "MatthewRudyJacobs@gmail.com"
data/lib/i18n/scope.rb CHANGED
@@ -3,7 +3,13 @@ require 'i18n'
3
3
  module I18n
4
4
 
5
5
  def self.scoped(scope=nil)
6
- I18n::Scope.new(scope)
6
+ rtn = I18n::Scope.new(scope)
7
+
8
+ if block_given?
9
+ yield rtn
10
+ else
11
+ rtn
12
+ end
7
13
  end
8
14
 
9
15
  class Scope
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: i18n_scope
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Matthew Rudy Jacobs