isveg 0.0.0 → 0.0.1
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 +4 -4
- data/lib/isveg.rb +12 -7
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f15b8c955dc24ca3157aab9b8ff3a6c4eb53df43
|
|
4
|
+
data.tar.gz: f98c0de9576d5c652add429208b5bb86c8506504
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1e3a29b9983c41a840bc45e02f4d19b9de5f36ad220d20e1cbbd9fd9d753394d1b5a03de9ac2ee2bd439e675d944fba193899462c8f3a541db3742702db16d3f
|
|
7
|
+
data.tar.gz: 7b712ec2bc11575b94b98103e9470978746ef9755813ab7b5e77632fdadd1bba2cde7252c4d9ee6444d4284ccc377ae83db1b791f2e4152efba4e6eaa234f91b
|
data/lib/isveg.rb
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
class Checkveg
|
|
2
2
|
def self.runcheck(product_name)
|
|
3
|
+
|
|
4
|
+
|
|
3
5
|
meats = ["lamb", "beef", "pork", "prawn", "chicken", "fish"]
|
|
4
6
|
|
|
5
|
-
meats.any
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
noVeg = meats.any? do |item|
|
|
8
|
+
product_name.downcase.include? item
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
if noVeg == true
|
|
12
|
+
result = "Not suitable for vegetarians"
|
|
13
|
+
else
|
|
14
|
+
result = "Suitable for vegetarians"
|
|
15
|
+
end
|
|
12
16
|
|
|
17
|
+
return result
|
|
13
18
|
end
|
|
14
19
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: isveg
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Keith Feeney
|
|
@@ -10,7 +10,7 @@ bindir: bin
|
|
|
10
10
|
cert_chain: []
|
|
11
11
|
date: 2019-03-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
|
-
description:
|
|
13
|
+
description: Updated version
|
|
14
14
|
email: x15015556@student.ncirl.ie
|
|
15
15
|
executables: []
|
|
16
16
|
extensions: []
|