Module: EventSource::Controls::StreamName
- Defined in:
- lib/event_source/controls/stream_name.rb
Class Method Summary collapse
Class Method Details
.example(category: nil, id: nil, type: nil, randomize_category: nil) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/event_source/controls/stream_name.rb', line 4 def self.example(category: nil, id: nil, type: nil, randomize_category: nil) category ||= Category.example(category: category, randomize_category: randomize_category) id ||= Identifier::UUID.random unless type.nil? category = "#{category}:#{type}" end "#{category}-#{id}" end |