Sha256: 3e21bc1d339e000a91b73685f365fcba772d42fa4b8d5cc725dd988a1719a4a6

Contents?: true

Size: 303 Bytes

Versions: 46

Compression:

Stored size: 303 Bytes

Contents

# .gsub(/[^A-Za-z0-9]/, " ").split.join("%")
require 'active_support/concern'

module StringConcern
  extend ActiveSupport::Concern

  def likeize
    # .select{|w| w.length > 2}
    strip.gsub(/[^A-Za-z0-9]/, " ").split.join("%")
  end
end

# include the extension
String.send(:include, StringConcern)

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
thecore-1.4.0 lib/string_extensions.rb
thecore-1.3.24 lib/string_extensions.rb
thecore-1.3.23 lib/string_extensions.rb
thecore-1.3.22 lib/string_extensions.rb
thecore-1.3.21 lib/string_extensions.rb
thecore-1.3.20 lib/string_extensions.rb