class EacRubyUtils::Locales::FromGem

def include

Returns:
  • (Pathname, nil) -
def include
  return nil unless exist?
  ::I18n.load_path += paths_to_load.map(&:to_path)
  path
end

def include_all(i18n_obj = nil)

def include_all(i18n_obj = nil)
  ::Gem::Specification.each { |gemspec| new(gemspec, i18n_obj).include }
end

def path

Returns:
  • (Pathname) -
def path
  gemspec.gem_dir.to_pathname.join(LOCALES_DIR_SUBPATH)
end

def paths_to_load

Returns:
  • (Pathname) -
def paths_to_load
  return [] unless exist?
  LOCALES_FILES_GLOB_PATTERNS.inject([]) { |a, e| a + path.glob(e) }
end