Class: Terrestrial::Cli::Bootstrapper
- Inherits:
-
Object
- Object
- Terrestrial::Cli::Bootstrapper
- Defined in:
- lib/terrestrial/cli/bootstrapper.rb,
lib/terrestrial/cli/bootstrapper.rb,
lib/terrestrial/cli/bootstrapper.rb
Defined Under Namespace
Classes: Entry, IdGenerator, Result
Class Method Summary collapse
Class Method Details
.find_new_strings(directory) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/terrestrial/cli/bootstrapper.rb', line 7 def self.find_new_strings(directory) result = Result.new entries = FileFinder.find(directory, EngineMapper::PARSERS.keys) .flat_map {|file| Parser.find_strings(file) } .reject {|entry| entry["string"] == "" } .select {|entry| Parser::StringAnalyser.is_string_for_humans?( entry["string"], entry["language"], entry["variables"])} entries.each do |entry| result.add(entry) end result end |