Sha256: 825f29deff6962c9b70e9670933ac69809227162c2bbab860b0e6347ee56d6de

Contents?: true

Size: 363 Bytes

Versions: 2

Compression:

Stored size: 363 Bytes

Contents

module RPS
  class UI

    def initialize(io = $stdout)
      @io = io
    end

    def render(process)
      string = format_string % [ process.pid,
                                 process.exe,
                                 process.command_line.join(' ') ]

      @io << string
    end

    def format_string
      "%d [%s] %s\n"
    end
  end # RPS
end # UI

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rps-0.0.2 lib/rps/ui.rb
rps-0.0.1 lib/rps/ui.rb