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.2.1 lib/neetob/cli/ui.rb
neetob-0.2.0 lib/neetob/cli/ui.rb
neetob-0.1.5 lib/neetob/cli/ui.rb