KayShawn 14.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 +7 -0
- data/lib/KayShawn.rb +45 -0
- metadata +42 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: da4bccd4a73d0aec4513ae4061b7e32040fa0470a868bfb9e2a7d93691ba22e5
|
4
|
+
data.tar.gz: 0762cb335c7959f81e57e115a024f822da4decf8ed6f5149888ff02c547d64b1
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 9b8fbcd1f1d9c54896d932ffa96a99e06474c885b2aa2dfe8b55ceb6d3520144cba67774831bdb7c5d42b145fec5ff113700b8f6af791250264a7839bf4d6097
|
7
|
+
data.tar.gz: d0851e052cf20d02f9dd62249940fb15d6c19e21b1720074e68f446ae1f5f4016ac3bf4fd65cbde200ea43973632a49f5ffaf7ee87b3466805abb774e581fcd7
|
data/lib/KayShawn.rb
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
class KayShawn
|
2
|
+
|
3
|
+
def self.hi(text)
|
4
|
+
|
5
|
+
@result = text
|
6
|
+
|
7
|
+
|
8
|
+
@words = []
|
9
|
+
@cleanWords =[]
|
10
|
+
|
11
|
+
@result.each do |x|
|
12
|
+
#words = []
|
13
|
+
#@cleanWords =[]
|
14
|
+
#get the values only from the hash
|
15
|
+
values = x.values
|
16
|
+
|
17
|
+
#convert it to string
|
18
|
+
strValue = values.to_s
|
19
|
+
#to utf 8
|
20
|
+
encodedValue = strValue.gsub(160.chr("UTF-8"),"") # this beautiful little function removes -> LIFE SAVER
|
21
|
+
#puts encodedValue
|
22
|
+
# remove html tags
|
23
|
+
rmvHtml = encodedValue.gsub(/(<[^>]*>)|\n|\t/s) {""}
|
24
|
+
|
25
|
+
# remove additional chars
|
26
|
+
rmvExtraChars = rmvHtml.tr('[]',"")
|
27
|
+
# still some chars left, gotta get rid of them
|
28
|
+
again = rmvExtraChars.delete('\\"')
|
29
|
+
#split each by white space
|
30
|
+
#word = again.split(' ')
|
31
|
+
#word is an array covert back to string
|
32
|
+
newWord =again.to_s
|
33
|
+
@words.push(newWord)
|
34
|
+
end
|
35
|
+
#p @words
|
36
|
+
@words.each do |ugh|
|
37
|
+
dog = ugh.split(" ")
|
38
|
+
dog.each do |mouse|
|
39
|
+
@cleanWords.push(mouse)
|
40
|
+
#p @cleanWords
|
41
|
+
end
|
42
|
+
end
|
43
|
+
p @cleanWords
|
44
|
+
end
|
45
|
+
end
|
metadata
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: KayShawn
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 14.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Kieran, Sean
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-11-20 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description:
|
14
|
+
email:
|
15
|
+
executables: []
|
16
|
+
extensions: []
|
17
|
+
extra_rdoc_files: []
|
18
|
+
files:
|
19
|
+
- lib/KayShawn.rb
|
20
|
+
homepage:
|
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.0.3
|
39
|
+
signing_key:
|
40
|
+
specification_version: 4
|
41
|
+
summary: Kieran and Sean gem
|
42
|
+
test_files: []
|