Class: Aigu::Importer
- Inherits:
-
Object
- Object
- Aigu::Importer
- Defined in:
- lib/aigu/importer.rb
Constant Summary collapse
- ARRAY_REGEX =
/___KEY___(?<index>\d+)$/
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Importer
constructor
A new instance of Importer.
- #process! ⇒ Object
Constructor Details
#initialize(opts = {}) ⇒ Importer
Returns a new instance of Importer.
5 6 7 8 9 |
# File 'lib/aigu/importer.rb', line 5 def initialize(opts = {}) @input_file = opts[:'input-file'] @output_directory = opts[:'output-directory'] @locale = opts[:locale] end |
Instance Method Details
#process! ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/aigu/importer.rb', line 11 def process! puts "Generating YAML files in `#{@output_directory}` based on Accent-generated `#{@input_file}` file" puts '---' parse_json build_blob write_yaml_files puts '---' puts 'Done' end |