Sha256: a102b72ba984b7e045a58e742bb2ae7e2afc134ee2ef98b0e803dfeffa25143d

Contents?: true

Size: 527 Bytes

Versions: 25

Compression:

Stored size: 527 Bytes

Contents

module Byebug
  module Helpers
    #
    # Utilities for interaction with strings
    #
    module StringHelper
      #
      # Converts +str+ from an_underscored-or-dasherized_string to
      # ACamelizedString.
      #
      def camelize(str)
        str.dup.split(/[_-]/).map(&:capitalize).join('')
      end

      #
      # Improves indentation and spacing in +str+ for readability in Byebug's
      # command prompt.
      #
      def prettify(str)
        "\n" + str.gsub(/^ {6}/, '') + "\n"
      end
    end
  end
end

Version data entries

25 entries across 24 versions & 3 rubygems

Version Path
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/byebug-9.0.6/lib/byebug/helpers/string.rb
tdiary-5.0.5 vendor/bundle/gems/byebug-9.0.6/lib/byebug/helpers/string.rb
tdiary-5.0.4 vendor/bundle/gems/byebug-9.0.6/lib/byebug/helpers/string.rb
byebug-9.0.6 lib/byebug/helpers/string.rb
byebug-9.0.5 lib/byebug/helpers/string.rb
byebug-9.0.4 lib/byebug/helpers/string.rb
byebug-9.0.3 lib/byebug/helpers/string.rb
byebug-9.0.2 lib/byebug/helpers/string.rb
byebug-9.0.1 lib/byebug/helpers/string.rb
byebug-9.0.0 lib/byebug/helpers/string.rb
byebug-8.2.5 lib/byebug/helpers/string.rb
byebug-8.2.4 lib/byebug/helpers/string.rb
byebug-8.2.3 lib/byebug/helpers/string.rb
byebug-8.2.2 lib/byebug/helpers/string.rb
byebug-8.2.1 lib/byebug/helpers/string.rb
byebug-8.2.0 lib/byebug/helpers/string.rb
byebug-8.1.0 lib/byebug/helpers/string.rb
byebug-8.0.1 lib/byebug/helpers/string.rb
byebug-8.0.0 lib/byebug/helpers/string.rb
byebug-7.0.0 lib/byebug/helpers/string.rb