Class: Aigu::AndroidImporter
- Inherits:
-
Object
- Object
- Aigu::AndroidImporter
- Defined in:
- lib/aigu/android_importer.rb
Constant Summary collapse
- ARRAY_REGEX =
/__ARRAY_ITEM__#(?<index>\d+)$/
- TYPE_REGEX =
/__@TYPE_(?<type_key>.+)$/
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ AndroidImporter
constructor
A new instance of AndroidImporter.
- #process! ⇒ Object
Constructor Details
#initialize(opts = {}) ⇒ AndroidImporter
Returns a new instance of AndroidImporter.
6 7 8 9 10 |
# File 'lib/aigu/android_importer.rb', line 6 def initialize(opts = {}) @input_file = opts[:'input-file'] @output_directory = opts[:'output-directory'] @locale = opts[:locale] end |
Instance Method Details
#process! ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/aigu/android_importer.rb', line 12 def process! puts "Generating Android XML files in `#{@output_directory}` based on Accent-generated `#{@input_file}` file" puts '---' parse_json @blob = split_res_types(@object) write_xml_files puts '---' puts 'Done' end |