yamlt 0.0.14 → 0.0.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/yamlt/updater.rb +9 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4cfb0d4a1969ac59105300556be5c1ccee0f93cc
|
4
|
+
data.tar.gz: 3920e55296571c100322bc02ea337ed16249c207
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5a24d5e60ba7b7022f48b635d2c05d580808204eee6ffcb405bca531d722ede3a61f3e50728003f1d62407e3a712b97b611e32a4cda7352ed78d4f3858cac6d
|
7
|
+
data.tar.gz: c4b7838ab5ee4556c578b83db2a60a70d495b32cdcf46eaf69aa55af02bba4aca714bf5bc471488789bd818fb406958e96e96cb7b8e2193c2d7c924501a0e44c
|
data/lib/yamlt/updater.rb
CHANGED
@@ -9,7 +9,7 @@ require "yamlt/translator"
|
|
9
9
|
|
10
10
|
module Yamlt
|
11
11
|
class Updater
|
12
|
-
def initialize(source, target, translator_class = Yamlt::
|
12
|
+
def initialize(source, target, translator_class = Yamlt::Updater.translator_class)
|
13
13
|
@source = source
|
14
14
|
@target = target
|
15
15
|
@translator = translator_class.new(state.language, loader.language)
|
@@ -31,6 +31,14 @@ module Yamlt
|
|
31
31
|
File.rename(target_updated, target)
|
32
32
|
end
|
33
33
|
|
34
|
+
def self.translator_class
|
35
|
+
if defined?(Yamlt::CustomTranslator)
|
36
|
+
Yamlt::CustomTranslator
|
37
|
+
else
|
38
|
+
Yamlt::Translator
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
34
42
|
private
|
35
43
|
|
36
44
|
def state
|