Class: CWG::Print::ProgressPrint

Inherits:
Object
  • Object
show all
Defined in:
/Users/martyn/cw/cw_clone/lib/cw/print.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) colour



11
12
13
# File '/Users/martyn/cw/cw_clone/lib/cw/print.rb', line 11

def colour
  :yellow
end

- (Object) flush



22
23
24
# File '/Users/martyn/cw/cw_clone/lib/cw/print.rb', line 22

def flush
  STDOUT.flush
end


15
16
17
# File '/Users/martyn/cw/cw_clone/lib/cw/print.rb', line 15

def print x
  STDOUT.print Paint[x, colour]
end

- (Object) puts(x)



18
19
20
# File '/Users/martyn/cw/cw_clone/lib/cw/print.rb', line 18

def puts x
  STDOUT.puts  Paint[x, colour]
end

- (Boolean) tty?

Returns:

  • (Boolean)


26
27
28
# File '/Users/martyn/cw/cw_clone/lib/cw/print.rb', line 26

def tty?
  true
end