lib/i18n/tasks/data/adapter/yaml_adapter.rb in i18n-tasks-0.9.6 vs lib/i18n/tasks/data/adapter/yaml_adapter.rb in i18n-tasks-0.9.7
- old
+ new
@@ -2,26 +2,25 @@
require 'yaml'
module I18n::Tasks
module Data
module Adapter
module YamlAdapter
- extend self
+ class << self
+ # @return [Hash] locale tree
+ def parse(str, options)
+ if YAML.method(:load).arity.abs == 2
+ YAML.load(str, options || {})
+ else
+ # older jruby and rbx 2.2.7 do not accept options
+ YAML.load(str)
+ end
+ end
- # @return [Hash] locale tree
- def parse(str, options)
- if YAML.method(:load).arity.abs == 2
- YAML.load(str, options || {})
- else
- # older jruby and rbx 2.2.7 do not accept options
- YAML.load(str)
+ # @return [String]
+ def dump(tree, options)
+ tree.to_yaml(options || {})
end
end
-
- # @return [String]
- def dump(tree, options)
- tree.to_yaml(options || {})
- end
-
end
end
end
end