Class: Zxcvbn::MatchBuilder Private

Inherits:
Struct
  • Object
show all
Defined in:
lib/zxcvbn/match_builder.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Mutable accumulator for match attributes. Matchers populate a builder incrementally; #build seals it into an immutable Match.

Instance Method Summary collapse

Instance Method Details

#buildMatch

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns immutable match with the current attribute values.

Returns:

  • (Match)

    immutable match with the current attribute values



11
12
13
# File 'lib/zxcvbn/match_builder.rb', line 11

def build
  Match.new(**to_h.tap { |h| h[:sub]&.freeze })
end