the_string_to_slug 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 684bf656a1ec8bfac56f1fa8f67579b8e80b7f8d
4
- data.tar.gz: eecff6e5a916491bbf70373725e01d7508878f0c
3
+ metadata.gz: 389c73d98e47c79490aae2d4b9ee61f28109e04f
4
+ data.tar.gz: ba6928be8712df7e7c01b8f514897fc772f1ca4e
5
5
  SHA512:
6
- metadata.gz: 81334984822f81166d450613ec63495d8efee0efcc1a9f8010d8a86fd97aed169b030e5b2504e3b7b067d3e0f5de09939a0c152b5c7af869c8e7dce8049b8910
7
- data.tar.gz: be2109b3b3fd391ca04d4100aa5551f1bf6bf56eef3c89695d3b31207a33cb601fee2a6995802a82f3dbf7c9b432a8dc25b4f862d6fdc5d7f226f2f9d6cbe7bd
6
+ metadata.gz: 3485d14abf498e308747a5aa43e43928faf1402b2321616cb3a9f11bf388593a11c97c334faa43d0bd22675908e30a998c62cc0b9c8a9615ffaccb5d330e97eb
7
+ data.tar.gz: ec782be0a9e01a778cfe9ad26c3bd4972678cb844f0d79180c14d7d4b2e0f630d658039d651413c7fd56e57186ea93dd174b8d989acb88ced5547a5f4ebd2acf
@@ -1,4 +1,13 @@
1
1
  require "the_string_to_slug/version"
2
- require "the_string_to_slug/string"
3
2
 
4
3
  module TheStringToSlug; end
4
+
5
+ class String
6
+ def self.to_slug_param str
7
+ I18n::transliterate(str).gsub('_','-').parameterize('-').downcase
8
+ end
9
+
10
+ def to_slug_param
11
+ self.class.to_slug_param(self)
12
+ end
13
+ end
@@ -1,3 +1,3 @@
1
1
  module TheStringToSlug
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: the_string_to_slug
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ilya N. Zykin