Sha256: 84f9cb7c0397bbf0fc9024c84c143ed8c6fcd69be22efd48cba62e8649fe0901

Contents?: true

Size: 244 Bytes

Versions: 7

Compression:

Stored size: 244 Bytes

Contents

# frozen_string_literal: true

# Custom methods for String class
class String
  def truncate(max)
    length > max ? "#{self[0...max]}..." : self
  end
end

# Custom methods for Symbol class
class Symbol
  def upcase!
    to_s.upcase
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
chatopsify-0.0.6 lib/core_ext/custom_lib.rb
chatopsify-0.0.5 lib/core_ext/custom_lib.rb
chatopsify-0.0.4 lib/core_ext/custom_lib.rb
chatopsify-0.0.3 lib/core_ext/custom_lib.rb
chatopsify-0.0.2 lib/core_ext/custom_lib.rb
chatopsify-0.0.1 lib/core_ext/custom_lib.rb
chatworkify-0.1.2 lib/core_ext/custom_lib.rb