Class: Steep::Drivers::DiagnosticPrinter::BaseFormatter

Inherits:
Object
  • Object
show all
Defined in:
lib/steep/drivers/diagnostic_printer/base_formatter.rb

Direct Known Subclasses

CodeFormatter, GitHubActionsFormatter

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(stdout:, buffer:) ⇒ BaseFormatter

Returns a new instance of BaseFormatter.



8
9
10
11
# File 'lib/steep/drivers/diagnostic_printer/base_formatter.rb', line 8

def initialize(stdout:, buffer:)
  @stdout = stdout
  @buffer = buffer
end

Instance Attribute Details

#bufferObject (readonly)

Returns the value of attribute buffer.



6
7
8
# File 'lib/steep/drivers/diagnostic_printer/base_formatter.rb', line 6

def buffer
  @buffer
end

#stdoutObject (readonly)

Returns the value of attribute stdout.



5
6
7
# File 'lib/steep/drivers/diagnostic_printer/base_formatter.rb', line 5

def stdout
  @stdout
end

Instance Method Details

#pathObject



13
14
15
# File 'lib/steep/drivers/diagnostic_printer/base_formatter.rb', line 13

def path
  Pathname(buffer.name)
end