class Gem::Comparator::Report::Entry
Attributes
data[RW]
indent[RW]
Public Class Methods
new(data = '', indent = '')
click to toggle source
# File lib/rubygems/comparator/report/entry.rb, line 8 def initialize(data = '', indent = '') @data = data @indent = indent end
Public Instance Methods
empty?()
click to toggle source
# File lib/rubygems/comparator/report/entry.rb, line 18 def empty? case @data when String, Array @data.empty? end end
print()
click to toggle source
# File lib/rubygems/comparator/report/entry.rb, line 25 def print printed = case @data when String "#{@indent}#{@data}" when Array @indent + @data.join("\n#{@indent}") else "#{@indent}#{@data}" end say printed end
set_indent!(indent)
click to toggle source
# File lib/rubygems/comparator/report/entry.rb, line 13 def set_indent!(indent) @indent = indent self end