module Expansions::CLIInterface

Public Instance Methods

ensure_expansion_file_provided(file) click to toggle source
# 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) click to toggle source
# File lib/expansions/cli_interface.rb, line 5
def get_expansion_file_name(args)
  return args.count > 0 ? args[0] : "ExpansionFile"
end
run(*args) click to toggle source
# File lib/expansions/cli_interface.rb, line 19
def run(*args)
  file_to_run = get_expansion_file_name(args)
  ensure_expansion_file_provided file_to_run
  Startup.run
  load file_to_run
  Expansion.instance.run
end