string_manipulator 0.1.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 +7 -0
- data/lib/string_manipulator.rb +14 -0
- metadata +58 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 10950db92f338946813fe2e7988b868a79ceee7ff03d7bda2f6c17cb3500383e
|
4
|
+
data.tar.gz: 4640306776e5fe5d357674528585b1125682869e564bc87dd189f231cac725d1
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: cfe5ed44ea53d4ef01cb60ab49fa254418f45729946855f41bf6bcb1a5bfafd94a1c32d3309b05d97d67980954e63f748e1345889eadf3522bfa8a0c6b9ce163
|
7
|
+
data.tar.gz: 29091925089637b1dd0a5b4cb897abe615561de7dce09132efce0888cd9913573fd5632f5fa519033ceb4249ed2bc938997721a975a001e6a91fe68cd6341814
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "string_manipulator/version"
|
4
|
+
|
5
|
+
module StringManipulator
|
6
|
+
class Error < StandardError; end
|
7
|
+
def self.to_snake_case(str)
|
8
|
+
str.gsub(/([A-Z\d]+)([A-Z][a-z\d]*)|\B([a-z\d])(?=[A-Z\d])|\W+/, '_').squeeze('_').sub(/^_|_$/, '').downcase
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.to_camel_case(str)
|
12
|
+
str.split(/[\s_-]+/).map(&:capitalize).join.tap { |s| s[0] = s[0].downcase }
|
13
|
+
end
|
14
|
+
end
|
metadata
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: string_manipulator
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Naing Lynn Aung
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2024-06-27 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rspec
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.0'
|
27
|
+
description: This gem provides for converting strings to various format
|
28
|
+
email:
|
29
|
+
- nainglynnaung25799@gmail.com
|
30
|
+
executables: []
|
31
|
+
extensions: []
|
32
|
+
extra_rdoc_files: []
|
33
|
+
files:
|
34
|
+
- lib/string_manipulator.rb
|
35
|
+
homepage: https://rubygems.org/gems/string_manipulator
|
36
|
+
licenses:
|
37
|
+
- MIT
|
38
|
+
metadata: {}
|
39
|
+
post_install_message:
|
40
|
+
rdoc_options: []
|
41
|
+
require_paths:
|
42
|
+
- lib
|
43
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 2.6.0
|
48
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
49
|
+
requirements:
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '0'
|
53
|
+
requirements: []
|
54
|
+
rubygems_version: 3.2.32
|
55
|
+
signing_key:
|
56
|
+
specification_version: 4
|
57
|
+
summary: A gem for string manipulation
|
58
|
+
test_files: []
|