Method: TermColor::RuleSet#print

Defined in:
lib/term_color/rule_set.rb

Wraps STDOUT print method, passing output of apply to print

Parameters:

  • Print arguments, including TermColor style tags

  • Optional params

Options Hash (**opts):

  • :out (IO)

    Optional override for IO class to call print on (default ‘$stdout`)



168
169
170
171
172
# File 'lib/term_color/rule_set.rb', line 168

def print(*args,**opts)
    stdout = opts.fetch(:out, $stdout)
    t = args.map{|a|apply(a)}
    stdout.print *t
end