Class: Aigu::Exporter
- Inherits:
-
Object
- Object
- Aigu::Exporter
- Defined in:
- lib/aigu/exporter.rb
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Exporter
constructor
A new instance of Exporter.
- #process! ⇒ Object
Constructor Details
#initialize(opts = {}) ⇒ Exporter
Returns a new instance of Exporter.
3 4 5 6 7 8 |
# File 'lib/aigu/exporter.rb', line 3 def initialize(opts = {}) @output_file = opts[:'output-file'] @input_directory = opts[:'input-directory'] @locale = opts[:locale] @ignore = opts[:ignore] end |
Instance Method Details
#process! ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/aigu/exporter.rb', line 10 def process! puts "Generating Accent JSON file `#{@output_file}` based on YAML localization files in `#{@input_directory}` directory" if @ignore print 'Ignoring ' puts @ignore.join(', ') end puts '---' build_output write_json_file puts '---' puts 'Done' end |