Sha256: 2c3775907b92e1e6ef3f6e0b0e41e23cab33d662f5094c06f82eaacc4c68dc12
Contents?: true
Size: 508 Bytes
Versions: 2
Compression:
Stored size: 508 Bytes
Contents
# typed: false class AppDetectionAnalysis < ApplicationRecord belongs_to :app_detection before_create :compute_confidence def compute_confidence path = EziiOsPath.new(self.jester_os_global_path) self.confidence = 0 if File.directory?(path.to_s) && Dir.entries(path.to_s).include?('app') && (Set.new(Dir.entries(File.join(path.to_s, 'app'))) & Set.new(['controllers', 'models'])).count == 2 self.confidence += 0.91 end rescue Errno::EACCES self.confidence = 0 end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
ezii-browser-1.0.0 | server/redux-os/app/models/app_detection_analysis.rb |
mega-os-1.0.0 | app/models/app_detection_analysis.rb |