Sha256: 6ba9e8ab3e965b9ee9b724587676e7bb7aae5006a2b6b04477451cf776e2091d

Contents?: true

Size: 340 Bytes

Versions: 20

Compression:

Stored size: 340 Bytes

Contents

class Symbol

  # Just like String#chomp.
  #
  #   :ab.chomp(:b)  #=> :a
  #
  # CREDIT: Trans

  def chomp(seperator)
    to_s.chomp(seperator.to_s).to_sym
  end

  # Just like String#lchomp.
  #
  #   :ab.lchomp(:a)  #=> :b
  #
  # CREDIT: Trans

  def lchomp(seperator)
    to_s.reverse.chomp(seperator.to_s).reverse.to_sym
  end

end

Version data entries

20 entries across 19 versions & 2 rubygems

Version Path
facets-glimmer-3.2.0 lib/core/facets/symbol/chomp.rb
facets-3.1.0 lib/core/facets/symbol/chomp.rb
facets-3.0.0 lib/core/facets/symbol/chomp.rb
facets-2.9.3 lib/core/facets/symbol/chomp.rb
facets-2.9.2 src/core/facets/symbol/chomp.rb
facets-2.9.2 lib/core/facets/symbol/chomp.rb
facets-2.9.1 lib/core/facets/symbol/chomp.rb
facets-2.9.0 lib/core/facets/symbol/chomp.rb
facets-2.9.0.pre.2 lib/core/facets/symbol/chomp.rb
facets-2.9.0.pre.1 lib/core/facets/symbol/chomp.rb
facets-2.8.4 lib/core/facets/symbol/chomp.rb
facets-2.8.3 lib/core/facets/symbol/chomp.rb
facets-2.8.2 lib/core/facets/symbol/chomp.rb
facets-2.8.1 lib/core/facets/symbol/chomp.rb
facets-2.8.0 lib/core/facets/symbol/chomp.rb
facets-2.7.0 lib/core/facets/symbol/chomp.rb
facets-2.6.0 lib/core/facets/symbol/chomp.rb
facets-2.5.1 lib/core/facets/symbol/chomp.rb
facets-2.5.0 lib/core/facets/symbol/chomp.rb
facets-2.5.2 lib/core/facets/symbol/chomp.rb