Class: Torkify::TestEvent

Inherits:
Struct
  • Object
show all
Includes:
EventMessage
Defined in:
lib/torkify/events/test_event.rb

Overview

Event used when a test is started.

This is currently only one type: ‘test’

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from EventMessage

#message

Instance Attribute Details

#fileObject

Returns the value of attribute file

Returns:

  • (Object)

    the current value of file



7
8
9
# File 'lib/torkify/events/test_event.rb', line 7

def file
  @file
end

#linesObject

Returns the value of attribute lines

Returns:

  • (Object)

    the current value of lines



7
8
9
# File 'lib/torkify/events/test_event.rb', line 7

def lines
  @lines
end

#log_fileObject

Returns the value of attribute log_file

Returns:

  • (Object)

    the current value of log_file



7
8
9
# File 'lib/torkify/events/test_event.rb', line 7

def log_file
  @log_file
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



7
8
9
# File 'lib/torkify/events/test_event.rb', line 7

def type
  @type
end

#workerObject

Returns the value of attribute worker

Returns:

  • (Object)

    the current value of worker



7
8
9
# File 'lib/torkify/events/test_event.rb', line 7

def worker
  @worker
end

Instance Method Details

#to_sObject



10
11
12
13
# File 'lib/torkify/events/test_event.rb', line 10

def to_s
  s = "#{type.upcase} #{file}"
  s += lines.any? ? " (lines #{lines.join(', ')})" : ''
end