Class: Homebrew::DevCmd::AdvisoryMatch::JsonEmitter Private
- 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
- #<<(record) ⇒ void private
- #finish ⇒ void private
- #initialize ⇒ void constructor private
Constructor Details
#initialize ⇒ 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.
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.
207 208 209 |
# File 'dev-cmd/advisory-match.rb', line 207 def <<(record) @records << record end |
#finish ⇒ 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.
212 213 214 |
# File 'dev-cmd/advisory-match.rb', line 212 def finish puts JSON.pretty_generate(@records) end |