Sha256: 5183b9723f1d5748730a5cae84db2793599fde07343f9f217bd905975802707d

Contents?: true

Size: 344 Bytes

Versions: 7

Compression:

Stored size: 344 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

7 entries across 7 versions & 2 rubygems

Version Path
facets-2.4.0 lib/facets/symbol/chomp.rb
facets-2.4.1 lib/facets/symbol/chomp.rb
facets-2.4.4 lib/core/facets/symbol/chomp.rb
facets-2.4.2 lib/core/facets/symbol/chomp.rb
facets-2.4.3 lib/core/facets/symbol/chomp.rb
facets-2.4.5 lib/core/facets/symbol/chomp.rb
mack-facets-0.8.2 lib/gems/facets-2.4.5/lib/core/facets/symbol/chomp.rb