CRA_logic_deepgem 0.1.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.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/CRA_logic_deep.rb +46 -0
  3. metadata +42 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: edbc5c37e873816ad512f92414f3e64d761da2188fa68f7b5868f33c23625d75
4
+ data.tar.gz: 1887cb0e4b46deaa035242ba4270b7abfc4d9777159192af8914dcf4c8dc4a37
5
+ SHA512:
6
+ metadata.gz: 3d0087f7433cd6255a1b4513aebb5ea02ea4529f39a7cc7a0e8e951f93c63f32132c84c3a0cccb591e2dce49fd993fa9ae83a6efcd512dbbbe91639290a497c9
7
+ data.tar.gz: 28ce9464b090f329b9264b1f2066303a386d63f1c4d192915a9fba6cd327866053d81363fd2f7036130cf5fde33a54fcbd1f425ce9763066c892c0cd464701c1
@@ -0,0 +1,46 @@
1
+ #Strategy Design Pattern
2
+ module CRA_logic_deep
3
+ class NoOfLines
4
+ def self.getData(firstParam,secondParam)
5
+ return firstParam = firstParam.to_i + 1
6
+ end
7
+ end
8
+
9
+ class NoOfMethods
10
+ def self.getData(firstParam,secondParam)
11
+ return firstParam = firstParam.to_i + 1
12
+ end
13
+ end
14
+
15
+ class CountWord
16
+ def self.getData(firstParam,secondParam)
17
+ return firstParam.scan(/(?=#{secondParam})/).count
18
+ end
19
+ end
20
+
21
+ class IsUpper
22
+ def self.getData(firstParam,secondParam)
23
+ return /[[:upper:]]/ =~ firstParam
24
+ end
25
+ end
26
+
27
+ class MethodCallCount
28
+ def self.getData(firstParam,secondParam)
29
+ firstParam = firstParam.to_s.gsub('.' ,'')
30
+ firstParam = firstParam.to_s.gsub('(' ,'')
31
+ return firstParam
32
+ end
33
+ end
34
+
35
+ class NumberofComments
36
+ def self.getData(firstParam,secondParam)
37
+ return firstParam = firstParam.to_i + 1
38
+ end
39
+ end
40
+
41
+ class NoOfClass
42
+ def self.getData(firstParam,secondParam)
43
+ return firstParam = firstParam.to_i + 1
44
+ end
45
+ end
46
+ end
metadata ADDED
@@ -0,0 +1,42 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: CRA_logic_deepgem
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - Deep Roychoudhury
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-04-20 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Algorithm to find errors in file
14
+ email: x19109130@student.ncirl.ie
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/CRA_logic_deep.rb
20
+ homepage: http://rubygems.org/gems/CRA_logic_deepgem
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.1.2
39
+ signing_key:
40
+ specification_version: 4
41
+ summary: Code Review
42
+ test_files: []