string_enhancer 0.2.0 → 0.3.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: 0dabbc40c3b8e754d0aa97aae29ca2cf40fc7820d82a56317e43088024e9aa14
4
- data.tar.gz: 495231af6177a3fda4df67bc2de328375899be3d8a76f8642bd96cd748807685
3
+ metadata.gz: f3f7a400dc97adece9eab29b59645299bbf0d05ad84e6e0c3238f53551345a65
4
+ data.tar.gz: f748147474ba4092f7e5558c0e71ad3ca19874b19f33f5ff932d77270ca0f7bd
5
5
  SHA512:
6
- metadata.gz: 216838bcb86e55a3c14ea6410532499346654fc8e94bd5861bf63f17c50e2c063a5acd947ea3186608b77301a38e80ee731f2518513967100810f7b105112074
7
- data.tar.gz: 878a6db93a63df4054832cac73570a0ad816e7c542e7d1bd426e41d58b0b66950461c3d6d7f4302d75f2ac17bc78c19b168536579c3408c9ea217d271c54055c
6
+ metadata.gz: c652e8f7ec9724cef1cdc29dd880101758e89dd27886c1aee165309de6bc187f9184989971b6d853b9961c5e2333724dda25ee2d8fd401d072cb62a0006e2057
7
+ data.tar.gz: 35b071bf40d879df9f188a232a7e5c70c470879d741b2b5a684cf1ff734db75053380912b1dad74231ef6857de95090cd25f21cb60f32d1aca5cbef10539f54f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.3.0] - 2024-03-06
4
+ ### Added
5
+ - 'titleize' method to capitalize each word in a string for title-like formatting.
6
+
3
7
  ## [0.2.0] - 2024-02-28
4
8
  ### Added
5
9
  -This marks the addition of the first real methods to the gem - #word_count and #palindrome?. Also includes rspec, simplecov, and circleci integration.
data/README.md CHANGED
@@ -3,6 +3,12 @@
3
3
  The StringEnhancer gem extends the Ruby string class with additional methods for formatting, manipulation, and querying, making string handling
4
4
  in Ruby even more powwerful.
5
5
 
6
+ ## Methods
7
+
8
+ - 'titleize': Capitalizes each word in a string to create a title-like format.
9
+ - 'word_count': Returns the number of words in a string.
10
+ - 'palindrome?: Checks whether the string is a palindrome, returning true or false.
11
+
6
12
  ## Installation
7
13
 
8
14
  Add this line to your application's Gemfile:
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module StringEnhancer
4
- VERSION = "0.2.0"
4
+ VERSION = "0.3.0"
5
5
  end
@@ -13,4 +13,8 @@ module StringEnhancer
13
13
  processed = string.downcase.gsub(/\W/, "")
14
14
  processed == processed.reverse
15
15
  end
16
+
17
+ def self.titleize(string)
18
+ string.split.map(&:capitalize).join(' ')
19
+ end
16
20
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: string_enhancer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henchworm