Module: Predicated::ContainerToString

Included in:
And, Or
Defined in:
lib/predicated/print.rb

Instance Method Summary collapse

Instance Method Details

#inspect(indent = "") ⇒ Object



46
47
48
49
50
51
52
53
54
55
56
# File 'lib/predicated/print.rb', line 46

def inspect(indent="")
  next_indent = indent + " " + " "
  
  str = "#{indent}#{self.class.shorthand}(\n"
  str << "#{part_inspect(left, next_indent)},\n"
  str << "#{part_inspect(right, next_indent)}\n"
  str << "#{indent})"
  str << "\n" if indent == ""
  
  str
end