Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

kachick/abb

Repository files navigation

abb

  • This repository is archived
  • No longer maintained
  • All versions have been removed from https://rubygems.org to free up valuable namespace for other developers.

Build Status

Generate abbreviations from words

Usage

Require Ruby 3.1 or later

Overview

require 'abb'

Abb.fold('google') #=> "ggl"

Extending String without namespace pollution

module YourModuleOrClass
  using Abb::Refinements

  def func
    p 'google'.abb  #=> "ggl"
    p 'Japan'.abb   #=> "Jpn"
    p 'American Standard Code for Information Interchange'.abb  #=> "ASCII"
  end
end

'google'.abb #=> NoMethodError