regex_data 0.1.3 → 0.1.4

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
  SHA1:
3
- metadata.gz: 37a3dd61be49b0cf884923723751a03aea44edcf
4
- data.tar.gz: 231b9be03e9b51472dde1e624bf249bdd3d0b512
3
+ metadata.gz: 59fc86241d5cc2dd774e9f648ad480c8a94fed52
4
+ data.tar.gz: dcf4f2886cfd83c82b9dcd470839905e75455937
5
5
  SHA512:
6
- metadata.gz: 57863beb54808ad5ea28d622fb7dffa4f5c6009a13015b739ab739c8faff725ade2809bc672c9459871a51063913fed5327c98a05e1cffe105b1eead83d68657
7
- data.tar.gz: '097f606920b63afa1546c50baab05a1e59695df66c5c059ad8eea9122b19d3576aae9e2d0d5612fc243c460d5264d28503202d47a9313cf3fcf3d3eac077579b'
6
+ metadata.gz: c82bf7d825a58b44fa1686ce62a73ca5668144e86b8a3be5dbd766cbf32f54ec8e703534cc61d21159798c3687b677c8b99abdd6d6bbd642546140a3efb87643
7
+ data.tar.gz: 773d6447b790f90e73088219fb215c9e6f9bfe7c42670a095ffcdce7912b91f1ea3bd04fdd0702647bf5141428683c23aba4d07c8fd9ad4fd7c317338ea919c4
@@ -1,22 +1,18 @@
1
1
  require "regex_data"
2
+ require "pry"
2
3
 
3
4
  class FilterkData
4
5
  def check
5
- str = " asd as asd asd asd as d asd "
6
- puts RegexData::remove_extra_space(str)
6
+ str = "*" * 3
7
+ puts str
7
8
 
8
- email = "abc-def@insta.com"
9
- puts RegexData::email?(email)
10
-
11
- html = "<span>Lorem Ipsum is simply dummy text of the printing and typesetting industry.</span>"
12
- puts RegexData::remove_html_tag(html)
13
-
14
- date = "21.12.1995"
15
- puts RegexData::date?(date)
9
+ end
16
10
 
17
- str = "Lorem Ipsum is simply dummy text of the printing and typesetting industry"
18
- puts RegexData::ban_word( str, "is", "text", "and")
11
+ def test
12
+ str = "asasd\nsdasdn\n\n\n\n\n\n\nAS"
13
+ p RegexData::remove_empty_line(str)
19
14
  end
15
+
20
16
  end
21
17
 
22
- FilterkData.new.check
18
+ FilterkData.new.test
@@ -1,3 +1,3 @@
1
1
  module RegexData
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
data/lib/regex_data.rb CHANGED
@@ -35,7 +35,7 @@ module RegexData
35
35
 
36
36
  def self.ban_word data, *args
37
37
  ban = args.join("|")
38
- return data.gsub(/(#{ban})/, '****')
38
+ return data.gsub!(/(#{ban})/, '****')
39
39
  end
40
40
 
41
41
  def self.remove_extra_space data
@@ -55,7 +55,7 @@ module RegexData
55
55
  data.length <= max ? true : false
56
56
  end
57
57
 
58
- def self.remove_empty_line
58
+ def self.remove_empty_line data
59
59
  return data.gsub(/[\n]+/, "\n")
60
60
  end
61
61
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: regex_data
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - at-hoangnguyen3
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-06-20 00:00:00.000000000 Z
11
+ date: 2017-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler