4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/message_store/controls/category.rb', line 4
def self.example(category: nil, type: nil, types: nil, randomize_category: nil)
if randomize_category.nil?
if !category.nil?
randomize_category = false
end
end
randomize_category = true if randomize_category.nil?
category ||= 'test'
if randomize_category
category = "#{category}#{SecureRandom.hex(16)}XX"
end
category = Controls::StreamName.stream_name(category, type: type, types: types)
category
end
|