alephant-renderer 0.0.7 → 0.0.8

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: fc887b41ef374aeb80db2cb2a46ec195cca52e7e
4
- data.tar.gz: 51cc19c95ec243a96cee9238f78389c04ced70f5
3
+ metadata.gz: 5b3e4f2af63d5bf342fcea4ce03b0d8a374582f1
4
+ data.tar.gz: 228afde78ea95f09d47cf78a3ec719056c0f46ca
5
5
  SHA512:
6
- metadata.gz: 2eea51315385b73e5ff8971d8bdf4e75cc40ef2716cc241aeee43f7828abadd0836560a648d573964d4fade6e7a918e502294dd952f7031fad196f55767d820b
7
- data.tar.gz: bf73813fd0c097ebf63a77296cdde9b4f28f9374bc02abb051eb95225b0595fda64c7556a366aa153c600a65bbe687d6147450ff0d0c09b985e87ac471708013
6
+ metadata.gz: 3b19e15e82b6e6ef56f7ad7fe77c8004ff0082f86be6d738e3513dbf5711d0a37bf5ae8a80a3bbfd4b5970fe69ad122902f1d3125d4f5bba392013a3ab95a736
7
+ data.tar.gz: 3929c6a4d61e9200c454d5ee29de7fb16c7ee64ae59bb452a0c91fd2fccd4754f2751cec0851543ad0b8dd0e01104ad1455362b7d510806358d089a1c8d85169
@@ -1,5 +1,5 @@
1
1
  module Alephant
2
2
  module Renderer
3
- VERSION = "0.0.7"
3
+ VERSION = "0.0.8"
4
4
  end
5
5
  end
@@ -8,14 +8,16 @@ module Alephant::Views
8
8
  class Base < Mustache
9
9
  attr_accessor :data
10
10
 
11
- LOCALE = :en
12
-
13
11
  def initialize(data = {})
14
12
  @data = Hashie::Mash.new data
15
13
  end
16
14
 
15
+ def locale
16
+ :en
17
+ end
18
+
17
19
  def t(key, params = {})
18
- I18n.locale = self.class::LOCALE
20
+ I18n.locale = locale
19
21
  prefix = /\/([^\/]+)\./.match(template_file)[1]
20
22
  I18n.translate("#{prefix}.#{key}", params)
21
23
  end
@@ -1,5 +1,7 @@
1
1
  module Fixtures
2
2
  class Welsh < ::Alephant::Views::Base
3
- LOCALE = :cy
3
+ def locale
4
+ :cy
5
+ end
4
6
  end
5
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alephant-renderer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Kenny
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-09 00:00:00.000000000 Z
11
+ date: 2014-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec