module EventSource::Controls::Category
Public Class Methods
example(category: nil, randomize_category: nil)
click to toggle source
# File lib/event_source/controls/category.rb, line 4 def self.example(category: 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 end