Sha256: e11ada4f3233118d0f85d074a074d2004111e555a30f84b133f806f09afa4157

Contents?: true

Size: 748 Bytes

Versions: 21

Compression:

Stored size: 748 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: 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

21 entries across 21 versions & 2 rubygems

Version Path
neetob-ud-1.0.59 lib/neetob/cli/ui.rb
neetob-ud-0.2.8 lib/neetob/cli/ui.rb
neetob-ud-0.2.6 lib/neetob/cli/ui.rb
neetob-ud-0.2.4 lib/neetob/cli/ui.rb
neetob-ud-0.2.3 lib/neetob/cli/ui.rb
neetob-ud-0.2.2 lib/neetob/cli/ui.rb
neetob-ud-0.2.1 lib/neetob/cli/ui.rb
neetob-ud-0.2.0 lib/neetob/cli/ui.rb
neetob-ud-0.1.3 lib/neetob/cli/ui.rb
neetob-ud-0.1.2 lib/neetob/cli/ui.rb
neetob-ud-0.1.1 lib/neetob/cli/ui.rb
neetob-ud-0.1.0 lib/neetob/cli/ui.rb
neetob-ud-0.2.14 lib/neetob/cli/ui.rb
neetob-ud-0.2.13 lib/neetob/cli/ui.rb
neetob-0.1.4 lib/neetob/cli/ui.rb
neetob-ud-0.2.11 lib/neetob/cli/ui.rb
neetob-ud-0.2.9 lib/neetob/cli/ui.rb
neetob-ud-0.2.5 lib/neetob/cli/ui.rb
neetob-0.1.2 lib/neetob/cli/ui.rb
neetob-0.1.1 lib/neetob/cli/ui.rb