Class: Flakie::Reporters::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/flakie/reporters/base.rb

Direct Known Subclasses

TicTacToe

Instance Method Summary collapse

Constructor Details

#initialize(output) ⇒ Base

Returns a new instance of Base.



6
7
8
# File 'lib/flakie/reporters/base.rb', line 6

def initialize(output)
  @output = output
end

Instance Method Details

#closeObject



14
15
16
# File 'lib/flakie/reporters/base.rb', line 14

def close
  output.close unless output.tty?
end

#openObject



10
11
12
# File 'lib/flakie/reporters/base.rb', line 10

def open
  output.sync ||= true
end

#report(_report) ⇒ Object

Raises:

  • (NotImplementedError)


18
19
20
# File 'lib/flakie/reporters/base.rb', line 18

def report(_report)
  raise NotImplementedError, "Base class must implement this method"
end