class I18nJSON::CLI::UI
Public Class Methods
new(stdout:, stderr:)
click to toggle source
# File lib/i18n-json/cli/ui.rb, line 6 def initialize(stdout:, stderr:) @stdout = stdout @stderr = stderr end
Public Instance Methods
exit_with(*message)
click to toggle source
# File lib/i18n-json/cli/ui.rb, line 24 def exit_with(*message) stdout_print(message) exit(0) end
fail_with(*message)
click to toggle source
# File lib/i18n-json/cli/ui.rb, line 19 def fail_with(*message) stderr_print(message) exit(1) end
stderr_print(*message)
click to toggle source
# File lib/i18n-json/cli/ui.rb, line 15 def stderr_print(*message) @stderr << "#{message.join(' ')}\n" end
stdout_print(*message)
click to toggle source
# File lib/i18n-json/cli/ui.rb, line 11 def stdout_print(*message) @stdout << "#{message.join(' ')}\n" end