Class: Yamlstrings::CLI
- Inherits:
-
Object
- Object
- Yamlstrings::CLI
- Defined in:
- lib/yamlstrings/cli.rb
Instance Method Summary collapse
-
#initialize ⇒ CLI
constructor
A new instance of CLI.
Constructor Details
#initialize ⇒ CLI
Returns a new instance of CLI.
3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/yamlstrings/cli.rb', line 3 def initialize if ARGV.length < 2 puts "Usage: yamlstrings <input1> [<input2>, ...] <output>" puts "\nyamlstrings version #{Yamlstrings::VERSION}" puts "Converts YAML files to strings files" return end inputs = ARGV[0..-2] output = ARGV.last converter = Yamlstrings::Converter.new(inputs) converter.to_file(output) end |