Module: TestBench::Telemetry::Controls::Events::Commented

Defined in:
lib/test_bench/telemetry/controls/events/commented.rb

Class Method Summary collapse

Class Method Details

.commentObject



20
# File 'lib/test_bench/telemetry/controls/events/commented.rb', line 20

def self.comment = Comment.example

.example(comment: nil, time: nil) ⇒ Object



6
7
8
9
10
11
# File 'lib/test_bench/telemetry/controls/events/commented.rb', line 6

def self.example(comment: nil, time: nil)
  comment ||= self.comment
  time ||= self.time

  TestBench::Telemetry::Event::Commented.new(comment, time)
end

.randomObject



13
14
15
16
17
18
# File 'lib/test_bench/telemetry/controls/events/commented.rb', line 13

def self.random
  comment = Comment.random
  time = Time.random

  example(comment:, time:)
end

.timeObject



21
# File 'lib/test_bench/telemetry/controls/events/commented.rb', line 21

def self.time = Time.example