Class: Homebrew::DevCmd::AdvisoryMatch::JsonEmitter Private

Inherits:
Emitter show all
Defined in:
dev-cmd/advisory-match.rb

This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.

Instance Method Summary collapse

Constructor Details

#initializevoid

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.



201
202
203
204
# File 'dev-cmd/advisory-match.rb', line 201

def initialize
  super
  @records = T.let([], T::Array[T::Hash[Symbol, T.untyped]])
end

Instance Method Details

#<<(record) ⇒ void

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

This method returns an undefined value.

Parameters:



207
208
209
# File 'dev-cmd/advisory-match.rb', line 207

def <<(record)
  @records << record
end

#finishvoid

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

This method returns an undefined value.



212
213
214
# File 'dev-cmd/advisory-match.rb', line 212

def finish
  puts JSON.pretty_generate(@records)
end