Sha256: 7832d12587ba5aae4ceff52c62af185156487ffde9d185f706b04b88adb9a375

Contents?: true

Size: 743 Bytes

Versions: 63

Compression:

Stored size: 743 Bytes

Contents

# frozen_string_literal: true

4# frozen_string_literal: true

require "thor"

module Neetob
  class CLI
    class UI
      attr_accessor :shell

      def initialize
        @shell = Thor::Base.shell.new
      end

      def say(statement, color = Thor::Shell::Color::YELLOW)
        shell.say(statement, color)
      end

      def ask(question, echo = true)
        shell.ask(question, echo:)
      end

      def yes?(question)
        shell.yes?(question)
      end

      def error(statement)
        shell.say(statement, Thor::Shell::Color::RED)
      end

      def success(statement)
        shell.say(statement, Thor::Shell::Color::GREEN)
      end

      def info(statement)
        shell.say(statement)
      end
    end
  end
end

Version data entries

63 entries across 63 versions & 1 rubygems

Version Path
neetob-0.5.16 lib/neetob/cli/ui.rb
neetob-0.5.15 lib/neetob/cli/ui.rb
neetob-0.5.14 lib/neetob/cli/ui.rb
neetob-0.5.13 lib/neetob/cli/ui.rb
neetob-0.5.12 lib/neetob/cli/ui.rb
neetob-0.5.11 lib/neetob/cli/ui.rb
neetob-0.5.10 lib/neetob/cli/ui.rb
neetob-0.5.9 lib/neetob/cli/ui.rb
neetob-0.5.8 lib/neetob/cli/ui.rb
neetob-0.5.7 lib/neetob/cli/ui.rb
neetob-0.5.6 lib/neetob/cli/ui.rb
neetob-0.5.5 lib/neetob/cli/ui.rb
neetob-0.5.4 lib/neetob/cli/ui.rb
neetob-0.5.3 lib/neetob/cli/ui.rb
neetob-0.5.2 lib/neetob/cli/ui.rb
neetob-0.5.1 lib/neetob/cli/ui.rb
neetob-0.5.0 lib/neetob/cli/ui.rb
neetob-0.4.37 lib/neetob/cli/ui.rb
neetob-0.4.36 lib/neetob/cli/ui.rb
neetob-0.4.35 lib/neetob/cli/ui.rb