class NameDisplay

Constants

HEROKU_APP_NAME
HEROKU_CLI
RENUO_CLI
SLIDES
WELCOME_MESSAGE

Public Instance Methods

run(args, options) click to toggle source
# File lib/renuo/cli/app/name_display.rb, line 8
def run(args, options)
  return open_path(SLIDES) if options.monitor
  return display_name(nil) if options.delete
  return say("empty argument") if args.empty?

  return run_heroku_command(args.join(" ")) if options.override

  display_name(args.join(" "))
end

Private Instance Methods

display_name(name) click to toggle source
# File lib/renuo/cli/app/name_display.rb, line 26
def display_name(name)
  text_message = [WELCOME_MESSAGE, name, "🥳🔥"].compact.join(" ")
  run_heroku_command(text_message)
end
run_heroku_command(text_message) click to toggle source
# File lib/renuo/cli/app/name_display.rb, line 31
def run_heroku_command(text_message)
  rails_command = "\"#{RENUO_CLI}['#{text_message}']\""
  run_command([HEROKU_CLI, rails_command, HEROKU_APP_NAME].join(" "))
end