Sha256: 570fc4c9da44afff9d2cc1e67c877c76cb26882724ec7c57f4678d9dd0f3e690

Contents?: true

Size: 171 Bytes

Versions: 5

Compression:

Stored size: 171 Bytes

Contents

# encoding: utf-8
class String
  def underline(character: '-')
    result = []
    result << self
    result << self.gsub(/./, character)

    result.join("\n")
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fedux_org-stdlib-0.7.21 lib/fedux_org_stdlib/core_ext/string/underline.rb
fedux_org-stdlib-0.7.20 lib/fedux_org_stdlib/core_ext/string/underline.rb
fedux_org-stdlib-0.7.19 lib/fedux_org_stdlib/core_ext/string/underline.rb
fedux_org-stdlib-0.7.18 lib/fedux_org_stdlib/core_ext/string/underline.rb
fedux_org-stdlib-0.7.17 lib/fedux_org_stdlib/core_ext/string/underline.rb