cutword 2.0.0.pre.alpha2 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3f7e9a8fcd185e1ec47ec3a222413f9b828537791e1f026ef5f7442d236909c8
4
- data.tar.gz: 59482810eeb3180668222ae9b51f1a74ed12982ef3c9cad8c2ffcc261629852d
3
+ metadata.gz: 5d40a4b29d85fd119f33316672a7a6b6f20645b24ee6f4c9366d4c343bad54e4
4
+ data.tar.gz: 1899724a1e1e5c2dde1fe6317e758eba0a476000dd56bc771eb5d8f1c83534e6
5
5
  SHA512:
6
- metadata.gz: 4a98830366a52b60c84a4bd1726934c86c14a05411b0a5279a88fca62f0996d0e0dac8db50e8ba4c84d521eb6eb20516d0f43966e580ed4bfb9756db38d56b19
7
- data.tar.gz: a3351559f6c7d253ed6a13d4689edab9809f9e2049dd850e0e3812dbe157e7a5075f3ee73f6f0adfb5628f330987ce6425621e80b3edc8b88561056383be307c
6
+ metadata.gz: 3b05ed9f572cb54923cd0c3aa3c964bf46f3857e1fb90d4e8e73b4f2b909f9be05009f097b3202ee3c8ec76777f5cf60c79a1d6e74adb727ca3a6533555a9c19
7
+ data.tar.gz: '0459bcdc940f1fa2363e7739d18c395b6c1682b4a09b5a6781cee0e023094d372b5cebb5822468c62ceec2c1753b73a049bdad613781f7c39847580530d2b3b0'
@@ -1,3 +1,3 @@
1
1
  module Cutword
2
- VERSION = '2.0.0-alpha2'
2
+ VERSION = '2.0.0'
3
3
  end
data/lib/cutword.rb CHANGED
@@ -1,16 +1,10 @@
1
1
  # lib/cutword.rb
2
2
 
3
-
4
-
5
- module Cutword
6
- class << self
7
- def get(max_length, text)
8
- if text.length > max_length
9
- truncated_text = text[0...max_length].strip
10
- truncated_text + (truncated_text.length < text.length ? '...' : '')
11
- else
12
- text
13
- end
14
- end
3
+ def Cutword(max_length, text)
4
+ if text.length > max_length
5
+ truncated_text = text[0...max_length].strip
6
+ truncated_text + (truncated_text.length < text.length ? '...' : '')
7
+ else
8
+ text
15
9
  end
16
- end
10
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cutword
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.pre.alpha2
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Demjhon Silver
@@ -11,7 +11,7 @@ cert_chain: []
11
11
  date: 2024-04-10 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: This gem provides string truncation and word cutting functionality for
14
- both Rails and Hanami.
14
+ both Rails and Hanami Framework.
15
15
  email: none
16
16
  executables: []
17
17
  extensions: []
@@ -34,13 +34,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
34
34
  version: 3.0.0
35
35
  required_rubygems_version: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - ">"
37
+ - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: 1.3.1
39
+ version: '0'
40
40
  requirements: []
41
41
  rubygems_version: 3.4.10
42
42
  signing_key:
43
43
  specification_version: 4
44
44
  summary: A simple gem for truncating words/strings or shortening words and names,
45
- compatible with Rails and Hanami.
45
+ compatible with Rails and Hanami Framework.
46
46
  test_files: []