Class: LC3Spec::Reporter
- Inherits:
-
Object
- Object
- LC3Spec::Reporter
- Defined in:
- lib/lc3spec/reporter.rb
Instance Method Summary collapse
- #errors ⇒ Object
- #fail? ⇒ Boolean
-
#initialize ⇒ Reporter
constructor
A new instance of Reporter.
- #pass? ⇒ Boolean
- #report(msg) ⇒ Object
Constructor Details
#initialize ⇒ Reporter
Returns a new instance of Reporter.
3 4 5 |
# File 'lib/lc3spec/reporter.rb', line 3 def initialize @reports = [] end |
Instance Method Details
#errors ⇒ Object
19 20 21 |
# File 'lib/lc3spec/reporter.rb', line 19 def errors @reports.dup end |
#fail? ⇒ Boolean
15 16 17 |
# File 'lib/lc3spec/reporter.rb', line 15 def fail? not @reports.empty? end |
#pass? ⇒ 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 |