Sha256: e66d29c3aeddc05a9c8b05005aa96ea441f737df71b08d80fdb39a5ede1588f0

Contents?: true

Size: 568 Bytes

Versions: 24

Compression:

Stored size: 568 Bytes

Contents

class String

  #ruby returns nil when nothing is stripped
  def strip_or_self
    tmp = self.strip!
    if tmp.nil?
      self
    else
      tmp
    end
  end

  def split_it(char)
    tmp = self.split(char)
    if tmp.nil?
      [self]
    else
      tmp
    end
  end
=begin
  def fill(pieces={})
    WidgetList::Utils::fill(pieces,self)
  end
=end

=begin
  def [](*args)
    obj = self.dup
    unless obj.nil?
      if args.first.class.name == 'Integer'
        obj = []
      else
        obj = {}
      end
      obj[args.first]
    end
    obj
  end
=end

end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
widget_list-1.3.7 lib/widget_list/string.rb
widget_list-1.3.6 lib/widget_list/string.rb
widget_list-1.3.5 lib/widget_list/string.rb
widget_list-1.2.0 lib/widget_list/string.rb
widget_list-1.1.9 lib/widget_list/string.rb
widget_list-1.1.8 lib/widget_list/string.rb
widget_list-1.1.7 lib/widget_list/string.rb
widget_list-1.1.6 lib/widget_list/string.rb
widget_list-1.1.5 lib/widget_list/string.rb
widget_list-1.1.4 lib/widget_list/string.rb
widget_list-1.1.3 lib/widget_list/string.rb
widget_list-1.1.2 lib/widget_list/string.rb
widget_list-1.1.1 lib/widget_list/string.rb
widget_list-1.1.0 lib/widget_list/string.rb
widget_list-1.0.11 lib/widget_list/string.rb
widget_list-1.0.10 lib/widget_list/string.rb
widget_list-1.0.9 lib/widget_list/string.rb
widget_list-1.0.8 lib/widget_list/string.rb
widget_list-1.0.7 lib/widget_list/string.rb
widget_list-1.0.6 lib/widget_list/string.rb