Module: PrintUtils
- Defined in:
- lib/print_utils.rb
Overview
print_utils.rb Copyright © Rémi Even 2017
This file is part of Xolti.
Xolti is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Xolti is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Xolti. If not, see <www.gnu.org/licenses/>.
Class Method Summary collapse
Class Method Details
.puts(message, indentation = 0) ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/print_utils.rb', line 20 def PrintUtils.puts(, indentation = 0) if (.is_a? String) return PrintUtils.puts_single(, indentation) end offset = "\t" * indentation .each { |line| Kernel.puts offset + line} end |
.puts_single(message, indentation = 0) ⇒ Object
28 29 30 |
# File 'lib/print_utils.rb', line 28 def PrintUtils.puts_single(, indentation = 0) Kernel.puts ("\t" * indentation) + end |