Class: Tlog::Output

Inherits:
Object
  • Object
show all
Defined in:
lib/tlog/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/tlog/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/tlog/output.rb', line 5

def stderr
  @stderr
end

#stdoutObject

Returns the value of attribute stdout.



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

def stdout
  @stdout
end

Instance Method Details

#error(err) ⇒ Object



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

def error(err)
	@stderr.puts err
end

#line(out) ⇒ Object



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

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

#line_red(out) ⇒ Object



25
26
27
# File 'lib/tlog/output.rb', line 25

def line_red(out)
	@stdout.puts out.red
end

#line_yellow(out) ⇒ Object



21
22
23
# File 'lib/tlog/output.rb', line 21

def line_yellow(out)
	@stdout.puts out.yellow
end