class Locale
Class for Locale
file
Attributes
code[R]
hash[R]
Public Class Methods
load(context_directory)
click to toggle source
# File lib/locales_toys/template/locale.rb, line 9 def self.load(context_directory) Dir["#{context_directory}/locales/*.y{a,}ml"].map do |file| new File.basename(file, '.*'), YAML.load_file(file) || {} end end
new(code, hash)
click to toggle source
# File lib/locales_toys/template/locale.rb, line 15 def initialize(code, hash) @code = code @hash = hash end
Public Instance Methods
diff(other)
click to toggle source
# File lib/locales_toys/template/locale.rb, line 63 def diff(other) HashCompare.new(hash, other.hash).different_keys end