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
Methods inherited from Emitter
#alias_protected?, #fixed_boundary_valid?, #history_required?, #prepare_aliases, #record_history_unavailable, #record_history_walk, #reintroduction_boundary_valid?, #reviewed_range_state
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.
601 602 603 604 |
# File 'dev-cmd/advisory-match.rb', line 601 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.
607 608 609 |
# File 'dev-cmd/advisory-match.rb', line 607 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.
612 613 614 |
# File 'dev-cmd/advisory-match.rb', line 612 def finish puts JSON.pretty_generate(@records) end |