Sha256: 94f85b94f9cac4fed760e77f93f4bfddb72da3fec9d648c2a6c7a638534e8763
Contents?: true
Size: 868 Bytes
Versions: 6
Compression:
Stored size: 868 Bytes
Contents
# frozen_string_literal: true module DiscourseTheme class UI @@prompt = ::TTY::Prompt.new(help_color: :cyan) @@pastel = Pastel.new def self.yes?(message) @@prompt.yes?(@@pastel.cyan("? ") + message) end def self.ask(message, default: nil) @@prompt.ask(@@pastel.cyan("? ") + message, default: default) end def self.select(message, options) @@prompt.select(@@pastel.cyan("? ") + message, options) end def self.info(message) puts @@pastel.blue("i ") + message end def self.progress(message) puts @@pastel.yellow("» ") + message end def self.error(message) puts @@pastel.red("✘ #{message}") end def self.warn(message) puts @@pastel.yellow("⚠ #{message}") end def self.success(message) puts @@pastel.green("✔ #{message}") end end end
Version data entries
6 entries across 6 versions & 1 rubygems