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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b3e4f2af63d5bf342fcea4ce03b0d8a374582f1
|
4
|
+
data.tar.gz: 228afde78ea95f09d47cf78a3ec719056c0f46ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b19e15e82b6e6ef56f7ad7fe77c8004ff0082f86be6d738e3513dbf5711d0a37bf5ae8a80a3bbfd4b5970fe69ad122902f1d3125d4f5bba392013a3ab95a736
|
7
|
+
data.tar.gz: 3929c6a4d61e9200c454d5ee29de7fb16c7ee64ae59bb452a0c91fd2fccd4754f2751cec0851543ad0b8dd0e01104ad1455362b7d510806358d089a1c8d85169
|
data/lib/alephant/views/base.rb
CHANGED
@@ -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 =
|
20
|
+
I18n.locale = locale
|
19
21
|
prefix = /\/([^\/]+)\./.match(template_file)[1]
|
20
22
|
I18n.translate("#{prefix}.#{key}", params)
|
21
23
|
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.
|
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-
|
11
|
+
date: 2014-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|