Module: Pomodoro::Commands::EnvironmentCommunication

Included in:
Pomodoro::Commander, Command
Defined in:
lib/pomodoro/commands.rb

Instance Method Summary collapse

Instance Method Details

#abort(*args) ⇒ Object


14
15
16
17
18
19
20
# File 'lib/pomodoro/commands.rb', line 14

def abort(*args)
  if args.first.is_a?(Exception)
    super("<red>#{args.first.message}</red>")
  else
    super(*args)
  end
end

#command(command) ⇒ Object


22
23
24
# File 'lib/pomodoro/commands.rb', line 22

def command(command)
  system(command)
end