Sha256: fc4b0ad80af7df19b2e34e6e8773116b62df6665fc960a54ca759cb43c54755c

Contents?: true

Size: 635 Bytes

Versions: 284

Compression:

Stored size: 635 Bytes

Contents

require "thor"

module Expressir
  module Cli
    class UI < Thor
      def self.ask(message)
        new.ask(message)
      end

      def self.say(message)
        new.say(message)
      end

      def self.error(message)
        if log_types.include?("error")
          new.error(message)
        end
      end

      def self.info(message)
        if log_types.include?("info")
          new.say(message)
        end
      end

      def self.run(command)
        require "open3"
        Open3.capture3(command)
      end

      def self.log_types
        Expressir.configuration.logs.map(&:to_s) || []
      end
    end
  end
end

Version data entries

284 entries across 284 versions & 1 rubygems

Version Path
expressir-1.2.3-aarch64-linux lib/expressir/cli/ui.rb
expressir-1.2.1 lib/expressir/cli/ui.rb
expressir-1.2.1-x86_64-linux lib/expressir/cli/ui.rb
expressir-1.2.1-x86_64-darwin lib/expressir/cli/ui.rb
expressir-1.2.1-x86-mingw32 lib/expressir/cli/ui.rb
expressir-1.2.1-x86-linux lib/expressir/cli/ui.rb
expressir-1.2.1-x64-mingw32 lib/expressir/cli/ui.rb
expressir-1.2.1-arm64-darwin lib/expressir/cli/ui.rb
expressir-1.2.0 lib/expressir/cli/ui.rb
expressir-1.2.0-x86_64-linux lib/expressir/cli/ui.rb
expressir-1.2.0-x86_64-darwin lib/expressir/cli/ui.rb
expressir-1.2.0-x86-mingw32 lib/expressir/cli/ui.rb
expressir-1.2.0-x86-linux lib/expressir/cli/ui.rb
expressir-1.2.0-x64-mingw32 lib/expressir/cli/ui.rb
expressir-1.2.0-arm64-darwin lib/expressir/cli/ui.rb
expressir-1.1.0 lib/expressir/cli/ui.rb
expressir-1.1.0-x86_64-linux lib/expressir/cli/ui.rb
expressir-1.1.0-x86_64-darwin lib/expressir/cli/ui.rb
expressir-1.1.0-x86-mingw32 lib/expressir/cli/ui.rb
expressir-1.1.0-x86-linux lib/expressir/cli/ui.rb