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