Class: Ppl::Application::Output

Inherits:
Object
  • Object
show all
Defined in:
lib/ppl/application/output.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(stdout, stderr) ⇒ Output

Returns a new instance of Output.



7
8
9
10
# File 'lib/ppl/application/output.rb', line 7

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

Instance Attribute Details

#stderrObject

Returns the value of attribute stderr.



5
6
7
# File 'lib/ppl/application/output.rb', line 5

def stderr
  @stderr
end

#stdoutObject

Returns the value of attribute stdout.



4
5
6
# File 'lib/ppl/application/output.rb', line 4

def stdout
  @stdout
end

Instance Method Details

#error(string) ⇒ Object



12
13
14
# File 'lib/ppl/application/output.rb', line 12

def error(string)
  @stderr.puts string
end

#line(string) ⇒ Object



16
17
18
19
# File 'lib/ppl/application/output.rb', line 16

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