class AmazingPrint::Indentator
Attributes
indentation[R]
shift_width[R]
Public Class Methods
new(indentation)
click to toggle source
# File lib/amazing_print/indentator.rb, line 7 def initialize(indentation) @indentation = indentation @shift_width = indentation.freeze end
Public Instance Methods
indent() { || ... }
click to toggle source
# File lib/amazing_print/indentator.rb, line 12 def indent @indentation += shift_width yield ensure @indentation -= shift_width end