File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
railties/lib/rails/generators Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -489,12 +489,16 @@ def optimize_indentation(value, amount = 0) # :doc:
489
489
end
490
490
alias rebase_indentation optimize_indentation
491
491
492
- # Indent the +Gemfile+ to the depth of @indentation
492
+ # Returns a string corresponding to the current indentation level
493
+ # (i.e. 2 * <code>@indentation</code> spaces). See also
494
+ # #with_indentation, which can be used to manage the indentation level.
493
495
def indentation # :doc:
494
496
" " * @indentation
495
497
end
496
498
497
- # Manage +Gemfile+ indentation for a DSL action block
499
+ # Increases the current indentation indentation level for the duration
500
+ # of the given block, and decreases it after the block ends. Call
501
+ # #indentation to get an indentation string.
498
502
def with_indentation ( &block ) # :doc:
499
503
@indentation += 1
500
504
instance_eval ( &block )
You can’t perform that action at this time.
0 commit comments