Class: Witt::Output

Inherits:
Object
  • Object
show all
Defined in:
lib/witt/output.rb

Instance Method Summary collapse

Instance Method Details



4
5
6
7
8
9
# File 'lib/witt/output.rb', line 4

def print(time, iata_code, timezone)
  formatted_time = time.strftime("%b %e, %H:%M")
  emoji = to_emoji(time)

  puts "#{iata_code}: #{emoji} #{formatted_time} (#{timezone})"
end


11
12
13
14
# File 'lib/witt/output.rb', line 11

def print_error(invalid_airports)
  error_message = "\nNo time zone info found for: #{invalid_airports.join(", ")}"
  puts message_in_red(error_message)
end