applicationrecommendation 0.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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 7a621c79b0ee8873c57b47b6e075ab36d344e51a
4
+ data.tar.gz: 86f685ab57f6aedd33fd9f09f9068347f00e31fd
5
+ SHA512:
6
+ metadata.gz: af1c18d80282a727167fc546f0b1271a6416ae25f84f0f824827e3637bc371007c39008427a65e079861cae5d2aebd74d3713bcb3ca8a7d8475d524b1c03276a
7
+ data.tar.gz: c2e92b42d038a803ab95ade47a224d571d723187a6d2d589a3050776bf3dcd085e93454c81edc22f2b7a33d5832b47157971a6f4525c4432534bb4c4c5dd7d95
@@ -0,0 +1,67 @@
1
+ # class ApplicationRecommendation < User
2
+ # module DecisionModule
3
+ class UserClass
4
+ def self.recommends(result1,result2)
5
+ end
6
+ end
7
+
8
+ class FirstTimeUserClass < UserClass
9
+
10
+ def recommends(reviews,installations)
11
+ @counter = 0
12
+ @recommender = []
13
+ @reviews = reviews
14
+ @installations = installations
15
+
16
+ @reviews.each do |r|
17
+ @installations.each do |i|
18
+ # if !(@recommender.include? r.application_id) || (@recommender.include? i.application_id)
19
+ if r.count > i.count
20
+ @recommender[@counter] = r.application_id
21
+ else
22
+ @recommender[@counter] = i.application_id
23
+ end
24
+ @counter = @counter+1
25
+ # end
26
+ end
27
+ end
28
+ return @recommender
29
+ end
30
+ end
31
+
32
+ class ApplicationRecommendationClass < UserClass
33
+ @resultArray = []
34
+ @temp = 0
35
+ @tempObject = nil
36
+
37
+ def recommends(result,result2)
38
+ @resultArray = result
39
+ @resultArray.each do |t|
40
+ #puts "#{t.person_id}===>#{t.category_id}===>#{t.count}"
41
+ if(t.count>@temp)
42
+ # puts @temp
43
+ @temp = t.count
44
+ @tempObject = t
45
+ # puts @temp
46
+ end
47
+ end
48
+ #puts "temperary object ====> #{@tempObject.person_id}, #{@tempObject.category_id}, #{@tempObject.count}"
49
+ puts @tempObject
50
+ return @tempObject
51
+ end
52
+ end
53
+ # end
54
+
55
+ class ApplicationRecommendationClassCaller
56
+
57
+ attr_accessor :type
58
+
59
+ def initialize type
60
+ @type = type
61
+ end
62
+
63
+ def generate(result1,result2)
64
+ @type.recommends(result1,result2)
65
+ end
66
+
67
+ end
metadata ADDED
@@ -0,0 +1,43 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: applicationrecommendation
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Surabhi Javkar
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-03-01 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: There are two different types of users firsttime and frequent
14
+ email: surabhijavkar@gmail.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/applicationrecommendation.rb
20
+ homepage: http://rubygems.org/gems/applicationrecommendation
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
+ rubyforge_project:
39
+ rubygems_version: 2.6.8
40
+ signing_key:
41
+ specification_version: 4
42
+ summary: provides recommendation for types of users
43
+ test_files: []