module DeepCover::Tools::IndentString

Constants

IMPLEMENTATION

In-place implementation copied from active-support.

Public Instance Methods

indent_string(string, *args) click to toggle source

Same as indent from active-support github.com/rails/rails/blob/10e1f1f9a129f2f197a44009a99b73b8ff9dbc0d/activesupport/lib/active_support/core_ext/string/indent.rb#L42

# File lib/deep_cover/tools/indent_string.rb, line 20
def indent_string(string, *args)
  string = string.dup
  indent_string!(string, *args)
  string
end
indent_string!(string, *args) click to toggle source

Same as indent! from active-support github.com/rails/rails/blob/10e1f1f9a129f2f197a44009a99b73b8ff9dbc0d/activesupport/lib/active_support/core_ext/string/indent.rb#L7

# File lib/deep_cover/tools/indent_string.rb, line 14
def indent_string!(string, *args)
  string.instance_exec(*args, &IMPLEMENTATION)
end