Sha256: 39285b6c74230bd1a5627de14d43bfb085276254039b64a2a3689bbfa895d72a

Contents?: true

Size: 511 Bytes

Versions: 7

Compression:

Stored size: 511 Bytes

Contents

#!/usr/bin/env ruby
# -*- encoding: utf-8 -*-
# Copyright muflax <mail@muflax.com>, 2013
# License: GNU GPL 3 <http://www.gnu.org/copyleft/gpl.html>

class String
  alias :starts_with? :start_with?
  alias :ends_with?   :end_with?

  def align str=" ", alignment: :left
    self.split("\n").align(str, alignment: alignment).join("\n")
  end

  def align! str=" ", alignment: :left
    self.replace(self.align(str, aligment: alignment))
  end

  def whackuum str=/\s+/
    self.split(str).map(&:strip)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
muflax-0.2.4 lib/muflax/string.rb
muflax-0.2.3 lib/muflax/string.rb
muflax-0.2.2 lib/muflax/string.rb
muflax-0.2.1 lib/muflax/string.rb
muflax-0.2.0 lib/muflax/string.rb
muflax-0.1.35 lib/muflax/string.rb
muflax-0.1.34 lib/muflax/string.rb