Class: LC3Spec::Reporter

Inherits:
Object
  • Object
show all
Defined in:
lib/lc3spec/reporter.rb

Instance Method Summary collapse

Constructor Details

#initializeReporter

Returns a new instance of Reporter.



3
4
5
# File 'lib/lc3spec/reporter.rb', line 3

def initialize
  @reports = []
end

Instance Method Details

#errorsObject



19
20
21
# File 'lib/lc3spec/reporter.rb', line 19

def errors
  @reports.dup
end

#fail?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/lc3spec/reporter.rb', line 15

def fail?
  not @reports.empty?
end

#pass?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/lc3spec/reporter.rb', line 11

def pass?
  @reports.empty?
end

#report(msg) ⇒ Object



7
8
9
# File 'lib/lc3spec/reporter.rb', line 7

def report(msg)
  @reports << msg
end