message_judgment 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.idea/.rakeTasks +7 -0
- data/.idea/vcs.xml +6 -0
- data/README.md +8 -1
- data/lib/message_judgment.rb +3 -2
- data/lib/message_judgment/version.rb +1 -1
- data/message_judgment-0.1.0.gem +0 -0
- data/message_judgment.gemspec +0 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50d211ef1b89824d36ed18ee29acdba2b04ec070
|
4
|
+
data.tar.gz: 58b64f6e0d35f0883a3d00bbe5a036599e70c818
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3655a7e5c4b33dcdb8215666fb1b297b36b8b473d2a5f1c20a8fc04b4d6404d40b4f07e169705fb05ff293ce832baf5e681595b00b173fd7bc109bd2ec47b79c
|
7
|
+
data.tar.gz: 9530e3ff18a7ff47a2b7694d0d64ff5992da0dff3e8bc54e322f70d9c4509a834cb4a4df0a6385a1f7c66c092af8930cac56e8377a87246024f03412a7d9e4f3
|
data/.idea/.rakeTasks
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<Settings><!--This file was automatically generated by Ruby plugin.
|
3
|
+
You are allowed to:
|
4
|
+
1. Remove rake task
|
5
|
+
2. Add existing rake tasks
|
6
|
+
To add existing rake tasks automatically delete this file and reload the project.
|
7
|
+
--><RakeGroup description="" fullCmd="" taksId="rake"><RakeTask description="Build message_judgment-0.1.0.gem into the pkg directory" fullCmd="build" taksId="build" /><RakeTask description="Remove any temporary products" fullCmd="clean" taksId="clean" /><RakeTask description="Remove any generated files" fullCmd="clobber" taksId="clobber" /><RakeTask description="Build and install message_judgment-0.1.0.gem into system gems" fullCmd="install" taksId="install" /><RakeGroup description="" fullCmd="" taksId="install"><RakeTask description="Build and install message_judgment-0.1.0.gem into system gems without network access" fullCmd="install:local" taksId="local" /></RakeGroup><RakeTask description="Create tag v0.1.0 and build and push message_judgment-0.1.0.gem to Rubygems" fullCmd="release[remote]" taksId="release[remote]" /><RakeTask description="Run RSpec code examples" fullCmd="spec" taksId="spec" /><RakeTask description="" fullCmd="default" taksId="default" /><RakeTask description="" fullCmd="release" taksId="release" /><RakeGroup description="" fullCmd="" taksId="release"><RakeTask description="" fullCmd="release:guard_clean" taksId="guard_clean" /><RakeTask description="" fullCmd="release:rubygem_push" taksId="rubygem_push" /><RakeTask description="" fullCmd="release:source_control_push" taksId="source_control_push" /></RakeGroup></RakeGroup></Settings>
|
data/.idea/vcs.xml
ADDED
data/README.md
CHANGED
@@ -21,8 +21,15 @@ Or install it yourself as:
|
|
21
21
|
$ gem install message_judgment
|
22
22
|
|
23
23
|
## Usage
|
24
|
+
```ruby
|
25
|
+
user_message="Hello,I want your sex!"
|
26
|
+
crazy_word=["shit","sex","fuck"]
|
27
|
+
puts message_judgment?(user_message,crazy_word)
|
28
|
+
```
|
24
29
|
|
25
|
-
|
30
|
+
```ruby
|
31
|
+
#response => Hello,I want your
|
32
|
+
```
|
26
33
|
|
27
34
|
## Development
|
28
35
|
|
data/lib/message_judgment.rb
CHANGED
@@ -2,8 +2,9 @@ require "message_judgment/version"
|
|
2
2
|
|
3
3
|
module MessageJudgment
|
4
4
|
def self.message_judgment?(message,targets)
|
5
|
-
targets.
|
6
|
-
message.include?(target)
|
5
|
+
targets.each do|target|
|
6
|
+
message.slice!(target) if message.include?(target)
|
7
7
|
end
|
8
|
+
return message
|
8
9
|
end
|
9
10
|
end
|
Binary file
|
data/message_judgment.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: message_judgment
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- NishidaRyu416
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -61,9 +61,11 @@ extensions: []
|
|
61
61
|
extra_rdoc_files: []
|
62
62
|
files:
|
63
63
|
- ".gitignore"
|
64
|
+
- ".idea/.rakeTasks"
|
64
65
|
- ".idea/message_judgment.iml"
|
65
66
|
- ".idea/misc.xml"
|
66
67
|
- ".idea/modules.xml"
|
68
|
+
- ".idea/vcs.xml"
|
67
69
|
- ".idea/workspace.xml"
|
68
70
|
- ".rspec"
|
69
71
|
- ".travis.yml"
|
@@ -76,6 +78,7 @@ files:
|
|
76
78
|
- bin/setup
|
77
79
|
- lib/message_judgment.rb
|
78
80
|
- lib/message_judgment/version.rb
|
81
|
+
- message_judgment-0.1.0.gem
|
79
82
|
- message_judgment.gemspec
|
80
83
|
homepage: https://ryu-nishida.blogspot.jp/
|
81
84
|
licenses:
|