class SoPerf::Spacer
Public Class Methods
new(chars=0)
click to toggle source
# File lib/soperf/soperf_helpers.rb, line 6 def initialize(chars=0) chars = chars.length if chars.is_a?(String) @length = chars end
Public Instance Methods
space(i=0)
click to toggle source
# File lib/soperf/soperf_helpers.rb, line 11 def space(i=0) i = i.length if i.is_a?(String) spacer = '' (@length-i).times { spacer<<' ' } spacer end