module RDocRuboCop::IndentUtil
Public Instance Methods
expand_tab()
click to toggle source
Since space indent and tab indent are mixed in Ruby source code, it is unified with space indent.
# File lib/rdoc_rubocop/indent_util.rb, line 14 def expand_tab gsub(/\t/, " ") end
indent()
click to toggle source
# File lib/rdoc_rubocop/indent_util.rb, line 4 def indent scan(/^ *(?=\S)/).min end
strip_indent()
click to toggle source
# File lib/rdoc_rubocop/indent_util.rb, line 8 def strip_indent gsub(/^#{indent}/, "") end