Sha256: c39597675836baf6cecfa91cd7d2bfa3e11c639ca1de91806004ab05c864274e
Contents?: true
Size: 341 Bytes
Versions: 56
Compression:
Stored size: 341 Bytes
Contents
# encoding: utf-8 # String class String # Underline a string # # @param [String] character ('-') # The character used to underline the string # # @return [String] # The string + underline def underline(character: '-') result = [] result << self result << gsub(/./, character) result.join("\n") end end
Version data entries
56 entries across 56 versions & 1 rubygems