Sha256: 9f2dd97b1e6e272d44038a01f57ea078c6f5aadddb66b571f39b321fb45c16c1

Contents?: true

Size: 657 Bytes

Versions: 11

Compression:

Stored size: 657 Bytes

Contents

require "json"
require "net/http"
require "thor"

module Codelation
  class Cli < Thor
  private

    # Print a heading to the terminal for commands that are going to be run.
    # @param heading [String]
    def print_heading(heading)
      puts "-----> #{heading}"
    end

    # Print a message to the terminal about a command that's going to run.
    # @param command [String]
    def print_command(command)
      puts "       #{command}"
    end

    # Run a command with Bash after first printing the command to the terminal.
    # @param command [String]
    def run_command(command)
      print_command(command)
      `#{command}`
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
codelation-cli-0.0.12 lib/codelation/base.rb
codelation-cli-0.0.11 lib/codelation/base.rb
codelation-cli-0.0.10 lib/codelation/base.rb
codelation-cli-0.0.9 lib/codelation/base.rb
codelation-cli-0.0.8 lib/codelation/base.rb
codelation-cli-0.0.7 lib/codelation/base.rb
codelation-cli-0.0.6 lib/codelation/base.rb
codelation-cli-0.0.5 lib/codelation/base.rb
codelation-cli-0.0.4 lib/codelation/base.rb
codelation-cli-0.0.3 lib/codelation/base.rb
codelation-cli-0.0.2 lib/codelation/base.rb