Sha256: ea000534eccb25c7dd6609f837484cd1ffd229e490974a1983517e9689cdc927

Contents?: true

Size: 241 Bytes

Versions: 1

Compression:

Stored size: 241 Bytes

Contents

# frozen_string_literal: true

require "numeronym/version"

module Numeronym
  def self.run(word)
    if word.size <= 2
      word
    else
      %(#{word[0]}#{word.size-2}#{word[-1]})
    end
  end
end

N7M = Numeronym unless defined?(N7M)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
numeronym-1.0.0 lib/numeronym.rb