module Byebug::Helpers::StringHelper

Utilities for interaction with strings

Public Instance Methods

camelize(str) click to toggle source

Converts str from an_underscored-or-dasherized_string to ACamelizedString.

# File lib/byebug/helpers/string.rb, line 11
def camelize(str)
  str.dup.split(/[_-]/).map(&:capitalize).join('')
end
prettify(str) click to toggle source

Improves indentation and spacing in str for readability in Byebug's command prompt.

# File lib/byebug/helpers/string.rb, line 19
def prettify(str)
  "\n" + str.gsub(/^ {6}/, '') + "\n"
end