Class: RSpec::Queue::ErrorReport

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec/queue/error_report.rb

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ ErrorReport

Returns a new instance of ErrorReport.



47
48
49
# File 'lib/rspec/queue/error_report.rb', line 47

def initialize(data)
  @data = data
end

Class Attribute Details

.coderObject

Returns the value of attribute coder.



6
7
8
# File 'lib/rspec/queue/error_report.rb', line 6

def coder
  @coder
end

Class Method Details

.load(payload) ⇒ Object



8
9
10
# File 'lib/rspec/queue/error_report.rb', line 8

def load(payload)
  new(coder.load(payload))
end

Instance Method Details

#dumpObject



51
52
53
# File 'lib/rspec/queue/error_report.rb', line 51

def dump
  self.class.coder.dump(@data)
end

#error_classObject



59
60
61
# File 'lib/rspec/queue/error_report.rb', line 59

def error_class
  @data[:error_class]
end

#outputObject



87
88
89
# File 'lib/rspec/queue/error_report.rb', line 87

def output
  @data[:output]
end

#test_and_module_nameObject



63
64
65
# File 'lib/rspec/queue/error_report.rb', line 63

def test_and_module_name
  @data[:test_and_module_name]
end

#test_fileObject



71
72
73
# File 'lib/rspec/queue/error_report.rb', line 71

def test_file
  @data[:test_file]
end

#test_lineObject



75
76
77
# File 'lib/rspec/queue/error_report.rb', line 75

def test_line
  @data[:test_line]
end

#test_nameObject



55
56
57
# File 'lib/rspec/queue/error_report.rb', line 55

def test_name
  @data[:test_name]
end

#test_suiteObject



67
68
69
# File 'lib/rspec/queue/error_report.rb', line 67

def test_suite
  @data[:test_suite]
end

#to_hObject



79
80
81
# File 'lib/rspec/queue/error_report.rb', line 79

def to_h
  @data
end

#to_sObject



83
84
85
# File 'lib/rspec/queue/error_report.rb', line 83

def to_s
  output
end