Sha256: ade85e1de13291edc5679b6db8572550a06dc0e41296a93fc3af4be3bc78436c

Contents?: true

Size: 401 Bytes

Versions: 22

Compression:

Stored size: 401 Bytes

Contents

class Ppl::Application::Output

  attr_accessor :stdout
  attr_accessor :stderr

  def initialize(stdout, stderr)
    @stdout = stdout
    @stderr = stderr
  end

  def error(string)
    @stderr.puts sanitise(string)
  end

  def line(string)
    @stdout.puts sanitise(string)
    true
  end

  private

  def sanitise(string)
    unless string.nil?
      string.to_s.delete "\r"
    end
  end

end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
ppl-3.0.1 lib/ppl/application/output.rb
ppl-3.0.0 lib/ppl/application/output.rb
ppl-2.4.1 lib/ppl/application/output.rb
ppl-2.4.0 lib/ppl/application/output.rb
ppl-2.3.3 lib/ppl/application/output.rb
ppl-2.3.2 lib/ppl/application/output.rb
ppl-2.3.1 lib/ppl/application/output.rb
ppl-2.3.0 lib/ppl/application/output.rb
ppl-2.2.0 lib/ppl/application/output.rb
ppl-2.1.0 lib/ppl/application/output.rb
ppl-2.0.0 lib/ppl/application/output.rb
ppl-1.25.0 lib/ppl/application/output.rb
ppl-1.24.0 lib/ppl/application/output.rb
ppl-1.23.0 lib/ppl/application/output.rb
ppl-1.22.2 lib/ppl/application/output.rb
ppl-1.22.1 lib/ppl/application/output.rb
ppl-1.22.0 lib/ppl/application/output.rb
ppl-1.21.0 lib/ppl/application/output.rb
ppl-1.20.0 lib/ppl/application/output.rb
ppl-1.19.0 lib/ppl/application/output.rb