check_bad 0.2.6
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/check.rb +19 -0
- metadata +42 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 12972d7037a612db12042a396337235d1f55960a2a0d335f7d868b7a9d5cde37
|
4
|
+
data.tar.gz: 61b4a6dfd306c443ca8df0134f5e93b3d69ab51f40bb8ee6aa054efb3069d4ee
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a7ce85d4215f598d597d1a4ac1ebfc161f725395e42a82a7b74efffc69cdb873ab0c967b64aa024216a6888f86d85c8bf560a623bb4200749c5334131354cfb8
|
7
|
+
data.tar.gz: 9dbad134306a3551255129033c5c08999cb7772e98d430ccdc66202d7f8fce28236d23c3d1d5dbe351aa43cfb80a5dec317fdc4a85272afdec6e01a406562277
|
data/lib/check.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
class Checkword
|
2
|
+
|
3
|
+
def self.runcheck(input)
|
4
|
+
# return input.split.map(&:capitalize).join(' ')
|
5
|
+
|
6
|
+
# converting to lower case
|
7
|
+
input=input.downcase
|
8
|
+
|
9
|
+
# replacing bad words
|
10
|
+
h=input.gsub("fuck", "f**k")
|
11
|
+
h=h.gsub("ass", "a**")
|
12
|
+
h=h.gsub("bitch", "b**ch")
|
13
|
+
|
14
|
+
# capitalizing first alphabet of every word
|
15
|
+
return h.split.map(&:capitalize).join(' ')
|
16
|
+
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
metadata
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: check_bad
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.6
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Abubakar
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2011-10-03 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: A simple gem
|
14
|
+
email: abubakargill538@gmail.com
|
15
|
+
executables: []
|
16
|
+
extensions: []
|
17
|
+
extra_rdoc_files: []
|
18
|
+
files:
|
19
|
+
- lib/check.rb
|
20
|
+
homepage: https://rubygems.org/profiles/Abubakar
|
21
|
+
licenses: []
|
22
|
+
metadata: {}
|
23
|
+
post_install_message:
|
24
|
+
rdoc_options: []
|
25
|
+
require_paths:
|
26
|
+
- lib
|
27
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
28
|
+
requirements:
|
29
|
+
- - ">="
|
30
|
+
- !ruby/object:Gem::Version
|
31
|
+
version: '0'
|
32
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
33
|
+
requirements:
|
34
|
+
- - ">="
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '0'
|
37
|
+
requirements: []
|
38
|
+
rubygems_version: 3.2.3
|
39
|
+
signing_key:
|
40
|
+
specification_version: 4
|
41
|
+
summary: Test to see if there is any bad word
|
42
|
+
test_files: []
|