Module: AnsiColor::StdOut
- Included in:
- AnsiColor
- Defined in:
- lib/ansi_color/std_out.rb
Instance Method Summary collapse
Instance Method Details
#print(*args) ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/ansi_color/std_out.rb', line 3 def print(*args) if args.last.is_a?(Hash) = args.pop open_tag = Helpers::build_open_tag() string = args.map { |arg| arg.to_s }.join super(open_tag + string + Helpers::reset) else super(*args) end end |
#puts(*args) ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/ansi_color/std_out.rb', line 14 def puts(*args) if args.last.is_a?(Hash) = args.pop open_tag = Helpers::build_open_tag() string = args.map { |arg| arg.to_s }.join("\n") super(open_tag + string + Helpers::reset) else super(*args) end end |