Module: Expansions::CLIInterface
Instance Method Summary collapse
- #ensure_expansion_file_provided(file) ⇒ Object
- #get_expansion_file_name(args) ⇒ Object
- #run(*args) ⇒ Object
Instance Method Details
#ensure_expansion_file_provided(file) ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/expansions/cli_interface.rb', line 9 def ensure_expansion_file_provided(file) unless File.exist?(file) print <<-prompt dwp_expand aborted! No Expansionfile found (looking for: ExpansionFile) prompt exit end end |
#get_expansion_file_name(args) ⇒ Object
5 6 7 |
# File 'lib/expansions/cli_interface.rb', line 5 def get_expansion_file_name(args) return args.count > 0 ? args[0] : "ExpansionFile" end |