class FakeActivity::TypeDetector
Constants
- TYPES_PROBABILITY
Attributes
random_number[R]
Public Class Methods
detect_type()
click to toggle source
# File lib/fake_activity/type_detector.rb, line 14 def self.detect_type new.detect_type end
new()
click to toggle source
# File lib/fake_activity/type_detector.rb, line 18 def initialize @random_number = rand(1..100) end
Public Instance Methods
detect_type()
click to toggle source
# File lib/fake_activity/type_detector.rb, line 22 def detect_type TYPES_PROBABILITY.each { |key, value| return key if value.include? random_number } end