Class: AdoptCommands
- Inherits:
-
Thor
- Object
- Thor
- AdoptCommands
- Defined in:
- lib/commands/adopt_commands.rb
Overview
:reek:FeatureEnvy { enabled: false }
Instance Method Summary collapse
Instance Method Details
#project(source_path) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/commands/adopt_commands.rb', line 14 def project(source_path) params = [:parameters] if params parsed = params.transform_keys(&:to_sym) parsed[:source_path] = source_path result = Adopter::AdoptMenu.adopt(parsed) print_programmatic_results(result) else Adopter::AdoptMenu.new.run end rescue Adopter::MobileProjectError => e puts "Error: #{e.message}" exit 1 rescue ArgumentError => e puts "Invalid parameters: #{e.message}" exit 1 end |