Class: FluentTools::AndroidCLI
- Inherits:
-
Thor
- Object
- Thor
- FluentTools::AndroidCLI
- Defined in:
- lib/fluent_tools/cli.rb
Overview
CLI commands for Android XML conversion
Instance Method Summary collapse
Instance Method Details
#from_fluent(input, output) ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/fluent_tools/cli.rb', line 15 def from_fluent(input, output) command_executor = CommandExecutor.new command_executor.fluent_to_android(input, output) puts "Successfully converted #{input} to #{output}" rescue Error => e puts "Error: #{e.message}" exit 1 end |
#to_fluent(input, output) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/fluent_tools/cli.rb', line 32 def to_fluent(input, output) command_executor = CommandExecutor.new command_executor.android_to_fluent(input, output, original_fluent: [:original_fluent]) = "Successfully converted #{input} to #{output}" += " using original Fluent file #{options[:original_fluent]}" if [:original_fluent] puts rescue Error => e puts "Error: #{e.message}" exit 1 end |