Class: Foreman::Engine::CLI

### Home Classes Methods

### In Files

- lib/foreman/engine/cli.rb

### Parent

Foreman::Engine

### Namespace

- MODULE Foreman::Engine::CLI::Color

### Methods

- #output
- #shutdown
- #startup

### Class/Module Index

Quicksearch

- Foreman
- Foreman::AppDoesNotExist
- Foreman::CLI
- Foreman::Distribution
- Foreman::Engine
- Foreman::Engine::CLI
- Foreman::Engine::CLI::Color
- Foreman::Export
- Foreman::Export::Base
- Foreman::Export::Bluepill
- Foreman::Export::Exception
- Foreman::Export::Inittab
- Foreman::Export::Launchd
- Foreman::Export::Runit
- Foreman::Export::Supervisord
- Foreman::Export::Upstart
- Foreman::Helpers
- Foreman::Process
- Foreman::Procfile

No matching classes.

# Foreman::Engine::CLI

### Constants

FOREMAN_COLORS

### Public Instance Methods

output(name, data) click to toggle source

    # File lib/foreman/engine/cli.rb, line 56
    def output(name, data)
      data.to_s.lines.map(&:chomp).each do |message|
        output  = ""
        output += $stdout.color(@colors[name.split(".").first].to_sym)
        output += "#{Time.now.strftime("%H:%M:%S")} #{pad_process_name(name)} | "
        output += $stdout.color(:reset)
        output += message
        $stdout.puts output
        $stdout.flush
      end
    rescue Errno::EPIPE
      terminate_gracefully
    end

shutdown() click to toggle source

    # File lib/foreman/engine/cli.rb, line 70
    def shutdown
    end

startup() click to toggle source

    # File lib/foreman/engine/cli.rb, line 50
    def startup
      @colors = map_colors
      proctitle "foreman: master" unless Foreman.windows?
      Color.enable($stdout, options[:color])
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.