Class: Zxcvbn::Match

Inherits:
Data
  • Object
show all
Defined in:
lib/zxcvbn/match.rb

Overview

A substring match found by one of the pattern matchers.

All attributes are optional and default to nil. Use #with to derive a new match with changed attributes.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pattern: nil, i: nil, j: nil, token: nil, matched_word: nil, rank: nil, dictionary_name: nil, reversed: nil, l33t: nil, sub: nil, sub_display: nil, guesses: nil, guesses_log10: nil, base_guesses: nil, uppercase_variations: nil, l33t_variations: nil, base_token: nil, repeat_count: nil, sequence_name: nil, sequence_space: nil, ascending: nil, graph: nil, turns: nil, shifted_count: nil, year: nil, month: nil, day: nil, separator: nil) ⇒ Match

Returns a new instance of Match.



73
74
75
76
77
78
79
80
81
82
83
# File 'lib/zxcvbn/match.rb', line 73

def initialize(
  pattern: nil, i: nil, j: nil, token: nil, matched_word: nil, rank: nil,
  dictionary_name: nil, reversed: nil, l33t: nil, sub: nil,
  sub_display: nil, guesses: nil, guesses_log10: nil, base_guesses: nil,
  uppercase_variations: nil, l33t_variations: nil, base_token: nil,
  repeat_count: nil, sequence_name: nil, sequence_space: nil,
  ascending: nil, graph: nil, turns: nil, shifted_count: nil,
  year: nil, month: nil, day: nil, separator: nil
)
  super
end

Instance Attribute Details

#ascendingObject (readonly)

Returns the value of attribute ascending

Returns:

  • (Object)

    the current value of ascending



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/zxcvbn/match.rb', line 66

Match = ::Data.define(
  :pattern, :i, :j, :token, :matched_word, :rank, :dictionary_name, :reversed,
  :l33t, :sub, :sub_display, :guesses, :guesses_log10, :base_guesses,
  :uppercase_variations, :l33t_variations, :base_token, :repeat_count,
  :sequence_name, :sequence_space, :ascending, :graph, :turns, :shifted_count,
  :year, :month, :day, :separator
) do
  def initialize(
    pattern: nil, i: nil, j: nil, token: nil, matched_word: nil, rank: nil,
    dictionary_name: nil, reversed: nil, l33t: nil, sub: nil,
    sub_display: nil, guesses: nil, guesses_log10: nil, base_guesses: nil,
    uppercase_variations: nil, l33t_variations: nil, base_token: nil,
    repeat_count: nil, sequence_name: nil, sequence_space: nil,
    ascending: nil, graph: nil, turns: nil, shifted_count: nil,
    year: nil, month: nil, day: nil, separator: nil
  )
    super
  end

  # @return [String] a human-readable representation omitting nil fields and token
  def inspect
    fields = to_h.reject { |k, v| v.nil? || k == :token }.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')
    "#<data #{self.class} #{fields}>"
  end

  # @param pp [PP] the pretty-printer instance
  # @return [void]
  def pretty_print(pp)
    fields = to_h.reject { |_, v| v.nil? }
    pp.group(1, "#<data #{self.class}", '>') do
      fields.each_with_index do |(k, v), i|
        pp.text(',') if i.positive?
        pp.breakable ' '
        pp.text("#{k}=")
        v.pretty_print(pp)
      end
    end
  end
end

#base_guessesObject (readonly)

Returns the value of attribute base_guesses

Returns:

  • (Object)

    the current value of base_guesses



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/zxcvbn/match.rb', line 66

Match = ::Data.define(
  :pattern, :i, :j, :token, :matched_word, :rank, :dictionary_name, :reversed,
  :l33t, :sub, :sub_display, :guesses, :guesses_log10, :base_guesses,
  :uppercase_variations, :l33t_variations, :base_token, :repeat_count,
  :sequence_name, :sequence_space, :ascending, :graph, :turns, :shifted_count,
  :year, :month, :day, :separator
) do
  def initialize(
    pattern: nil, i: nil, j: nil, token: nil, matched_word: nil, rank: nil,
    dictionary_name: nil, reversed: nil, l33t: nil, sub: nil,
    sub_display: nil, guesses: nil, guesses_log10: nil, base_guesses: nil,
    uppercase_variations: nil, l33t_variations: nil, base_token: nil,
    repeat_count: nil, sequence_name: nil, sequence_space: nil,
    ascending: nil, graph: nil, turns: nil, shifted_count: nil,
    year: nil, month: nil, day: nil, separator: nil
  )
    super
  end

  # @return [String] a human-readable representation omitting nil fields and token
  def inspect
    fields = to_h.reject { |k, v| v.nil? || k == :token }.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')
    "#<data #{self.class} #{fields}>"
  end

  # @param pp [PP] the pretty-printer instance
  # @return [void]
  def pretty_print(pp)
    fields = to_h.reject { |_, v| v.nil? }
    pp.group(1, "#<data #{self.class}", '>') do
      fields.each_with_index do |(k, v), i|
        pp.text(',') if i.positive?
        pp.breakable ' '
        pp.text("#{k}=")
        v.pretty_print(pp)
      end
    end
  end
end

#base_tokenObject (readonly)

Returns the value of attribute base_token

Returns:

  • (Object)

    the current value of base_token



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/zxcvbn/match.rb', line 66

Match = ::Data.define(
  :pattern, :i, :j, :token, :matched_word, :rank, :dictionary_name, :reversed,
  :l33t, :sub, :sub_display, :guesses, :guesses_log10, :base_guesses,
  :uppercase_variations, :l33t_variations, :base_token, :repeat_count,
  :sequence_name, :sequence_space, :ascending, :graph, :turns, :shifted_count,
  :year, :month, :day, :separator
) do
  def initialize(
    pattern: nil, i: nil, j: nil, token: nil, matched_word: nil, rank: nil,
    dictionary_name: nil, reversed: nil, l33t: nil, sub: nil,
    sub_display: nil, guesses: nil, guesses_log10: nil, base_guesses: nil,
    uppercase_variations: nil, l33t_variations: nil, base_token: nil,
    repeat_count: nil, sequence_name: nil, sequence_space: nil,
    ascending: nil, graph: nil, turns: nil, shifted_count: nil,
    year: nil, month: nil, day: nil, separator: nil
  )
    super
  end

  # @return [String] a human-readable representation omitting nil fields and token
  def inspect
    fields = to_h.reject { |k, v| v.nil? || k == :token }.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')
    "#<data #{self.class} #{fields}>"
  end

  # @param pp [PP] the pretty-printer instance
  # @return [void]
  def pretty_print(pp)
    fields = to_h.reject { |_, v| v.nil? }
    pp.group(1, "#<data #{self.class}", '>') do
      fields.each_with_index do |(k, v), i|
        pp.text(',') if i.positive?
        pp.breakable ' '
        pp.text("#{k}=")
        v.pretty_print(pp)
      end
    end
  end
end

#dayObject (readonly)

Returns the value of attribute day

Returns:

  • (Object)

    the current value of day



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/zxcvbn/match.rb', line 66

Match = ::Data.define(
  :pattern, :i, :j, :token, :matched_word, :rank, :dictionary_name, :reversed,
  :l33t, :sub, :sub_display, :guesses, :guesses_log10, :base_guesses,
  :uppercase_variations, :l33t_variations, :base_token, :repeat_count,
  :sequence_name, :sequence_space, :ascending, :graph, :turns, :shifted_count,
  :year, :month, :day, :separator
) do
  def initialize(
    pattern: nil, i: nil, j: nil, token: nil, matched_word: nil, rank: nil,
    dictionary_name: nil, reversed: nil, l33t: nil, sub: nil,
    sub_display: nil, guesses: nil, guesses_log10: nil, base_guesses: nil,
    uppercase_variations: nil, l33t_variations: nil, base_token: nil,
    repeat_count: nil, sequence_name: nil, sequence_space: nil,
    ascending: nil, graph: nil, turns: nil, shifted_count: nil,
    year: nil, month: nil, day: nil, separator: nil
  )
    super
  end

  # @return [String] a human-readable representation omitting nil fields and token
  def inspect
    fields = to_h.reject { |k, v| v.nil? || k == :token }.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')
    "#<data #{self.class} #{fields}>"
  end

  # @param pp [PP] the pretty-printer instance
  # @return [void]
  def pretty_print(pp)
    fields = to_h.reject { |_, v| v.nil? }
    pp.group(1, "#<data #{self.class}", '>') do
      fields.each_with_index do |(k, v), i|
        pp.text(',') if i.positive?
        pp.breakable ' '
        pp.text("#{k}=")
        v.pretty_print(pp)
      end
    end
  end
end

#dictionary_nameObject (readonly)

Returns the value of attribute dictionary_name

Returns:

  • (Object)

    the current value of dictionary_name



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/zxcvbn/match.rb', line 66

Match = ::Data.define(
  :pattern, :i, :j, :token, :matched_word, :rank, :dictionary_name, :reversed,
  :l33t, :sub, :sub_display, :guesses, :guesses_log10, :base_guesses,
  :uppercase_variations, :l33t_variations, :base_token, :repeat_count,
  :sequence_name, :sequence_space, :ascending, :graph, :turns, :shifted_count,
  :year, :month, :day, :separator
) do
  def initialize(
    pattern: nil, i: nil, j: nil, token: nil, matched_word: nil, rank: nil,
    dictionary_name: nil, reversed: nil, l33t: nil, sub: nil,
    sub_display: nil, guesses: nil, guesses_log10: nil, base_guesses: nil,
    uppercase_variations: nil, l33t_variations: nil, base_token: nil,
    repeat_count: nil, sequence_name: nil, sequence_space: nil,
    ascending: nil, graph: nil, turns: nil, shifted_count: nil,
    year: nil, month: nil, day: nil, separator: nil
  )
    super
  end

  # @return [String] a human-readable representation omitting nil fields and token
  def inspect
    fields = to_h.reject { |k, v| v.nil? || k == :token }.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')
    "#<data #{self.class} #{fields}>"
  end

  # @param pp [PP] the pretty-printer instance
  # @return [void]
  def pretty_print(pp)
    fields = to_h.reject { |_, v| v.nil? }
    pp.group(1, "#<data #{self.class}", '>') do
      fields.each_with_index do |(k, v), i|
        pp.text(',') if i.positive?
        pp.breakable ' '
        pp.text("#{k}=")
        v.pretty_print(pp)
      end
    end
  end
end

#graphObject (readonly)

Returns the value of attribute graph

Returns:

  • (Object)

    the current value of graph



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/zxcvbn/match.rb', line 66

Match = ::Data.define(
  :pattern, :i, :j, :token, :matched_word, :rank, :dictionary_name, :reversed,
  :l33t, :sub, :sub_display, :guesses, :guesses_log10, :base_guesses,
  :uppercase_variations, :l33t_variations, :base_token, :repeat_count,
  :sequence_name, :sequence_space, :ascending, :graph, :turns, :shifted_count,
  :year, :month, :day, :separator
) do
  def initialize(
    pattern: nil, i: nil, j: nil, token: nil, matched_word: nil, rank: nil,
    dictionary_name: nil, reversed: nil, l33t: nil, sub: nil,
    sub_display: nil, guesses: nil, guesses_log10: nil, base_guesses: nil,
    uppercase_variations: nil, l33t_variations: nil, base_token: nil,
    repeat_count: nil, sequence_name: nil, sequence_space: nil,
    ascending: nil, graph: nil, turns: nil, shifted_count: nil,
    year: nil, month: nil, day: nil, separator: nil
  )
    super
  end

  # @return [String] a human-readable representation omitting nil fields and token
  def inspect
    fields = to_h.reject { |k, v| v.nil? || k == :token }.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')
    "#<data #{self.class} #{fields}>"
  end

  # @param pp [PP] the pretty-printer instance
  # @return [void]
  def pretty_print(pp)
    fields = to_h.reject { |_, v| v.nil? }
    pp.group(1, "#<data #{self.class}", '>') do
      fields.each_with_index do |(k, v), i|
        pp.text(',') if i.positive?
        pp.breakable ' '
        pp.text("#{k}=")
        v.pretty_print(pp)
      end
    end
  end
end

#guessesObject (readonly)

Returns the value of attribute guesses

Returns:

  • (Object)

    the current value of guesses



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/zxcvbn/match.rb', line 66

Match = ::Data.define(
  :pattern, :i, :j, :token, :matched_word, :rank, :dictionary_name, :reversed,
  :l33t, :sub, :sub_display, :guesses, :guesses_log10, :base_guesses,
  :uppercase_variations, :l33t_variations, :base_token, :repeat_count,
  :sequence_name, :sequence_space, :ascending, :graph, :turns, :shifted_count,
  :year, :month, :day, :separator
) do
  def initialize(
    pattern: nil, i: nil, j: nil, token: nil, matched_word: nil, rank: nil,
    dictionary_name: nil, reversed: nil, l33t: nil, sub: nil,
    sub_display: nil, guesses: nil, guesses_log10: nil, base_guesses: nil,
    uppercase_variations: nil, l33t_variations: nil, base_token: nil,
    repeat_count: nil, sequence_name: nil, sequence_space: nil,
    ascending: nil, graph: nil, turns: nil, shifted_count: nil,
    year: nil, month: nil, day: nil, separator: nil
  )
    super
  end

  # @return [String] a human-readable representation omitting nil fields and token
  def inspect
    fields = to_h.reject { |k, v| v.nil? || k == :token }.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')
    "#<data #{self.class} #{fields}>"
  end

  # @param pp [PP] the pretty-printer instance
  # @return [void]
  def pretty_print(pp)
    fields = to_h.reject { |_, v| v.nil? }
    pp.group(1, "#<data #{self.class}", '>') do
      fields.each_with_index do |(k, v), i|
        pp.text(',') if i.positive?
        pp.breakable ' '
        pp.text("#{k}=")
        v.pretty_print(pp)
      end
    end
  end
end

#guesses_log10Object (readonly)

Returns the value of attribute guesses_log10

Returns:

  • (Object)

    the current value of guesses_log10



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/zxcvbn/match.rb', line 66

Match = ::Data.define(
  :pattern, :i, :j, :token, :matched_word, :rank, :dictionary_name, :reversed,
  :l33t, :sub, :sub_display, :guesses, :guesses_log10, :base_guesses,
  :uppercase_variations, :l33t_variations, :base_token, :repeat_count,
  :sequence_name, :sequence_space, :ascending, :graph, :turns, :shifted_count,
  :year, :month, :day, :separator
) do
  def initialize(
    pattern: nil, i: nil, j: nil, token: nil, matched_word: nil, rank: nil,
    dictionary_name: nil, reversed: nil, l33t: nil, sub: nil,
    sub_display: nil, guesses: nil, guesses_log10: nil, base_guesses: nil,
    uppercase_variations: nil, l33t_variations: nil, base_token: nil,
    repeat_count: nil, sequence_name: nil, sequence_space: nil,
    ascending: nil, graph: nil, turns: nil, shifted_count: nil,
    year: nil, month: nil, day: nil, separator: nil
  )
    super
  end

  # @return [String] a human-readable representation omitting nil fields and token
  def inspect
    fields = to_h.reject { |k, v| v.nil? || k == :token }.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')
    "#<data #{self.class} #{fields}>"
  end

  # @param pp [PP] the pretty-printer instance
  # @return [void]
  def pretty_print(pp)
    fields = to_h.reject { |_, v| v.nil? }
    pp.group(1, "#<data #{self.class}", '>') do
      fields.each_with_index do |(k, v), i|
        pp.text(',') if i.positive?
        pp.breakable ' '
        pp.text("#{k}=")
        v.pretty_print(pp)
      end
    end
  end
end

#iObject (readonly)

Returns the value of attribute i

Returns:

  • (Object)

    the current value of i



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/zxcvbn/match.rb', line 66

Match = ::Data.define(
  :pattern, :i, :j, :token, :matched_word, :rank, :dictionary_name, :reversed,
  :l33t, :sub, :sub_display, :guesses, :guesses_log10, :base_guesses,
  :uppercase_variations, :l33t_variations, :base_token, :repeat_count,
  :sequence_name, :sequence_space, :ascending, :graph, :turns, :shifted_count,
  :year, :month, :day, :separator
) do
  def initialize(
    pattern: nil, i: nil, j: nil, token: nil, matched_word: nil, rank: nil,
    dictionary_name: nil, reversed: nil, l33t: nil, sub: nil,
    sub_display: nil, guesses: nil, guesses_log10: nil, base_guesses: nil,
    uppercase_variations: nil, l33t_variations: nil, base_token: nil,
    repeat_count: nil, sequence_name: nil, sequence_space: nil,
    ascending: nil, graph: nil, turns: nil, shifted_count: nil,
    year: nil, month: nil, day: nil, separator: nil
  )
    super
  end

  # @return [String] a human-readable representation omitting nil fields and token
  def inspect
    fields = to_h.reject { |k, v| v.nil? || k == :token }.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')
    "#<data #{self.class} #{fields}>"
  end

  # @param pp [PP] the pretty-printer instance
  # @return [void]
  def pretty_print(pp)
    fields = to_h.reject { |_, v| v.nil? }
    pp.group(1, "#<data #{self.class}", '>') do
      fields.each_with_index do |(k, v), i|
        pp.text(',') if i.positive?
        pp.breakable ' '
        pp.text("#{k}=")
        v.pretty_print(pp)
      end
    end
  end
end

#jObject (readonly)

Returns the value of attribute j

Returns:

  • (Object)

    the current value of j



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/zxcvbn/match.rb', line 66

Match = ::Data.define(
  :pattern, :i, :j, :token, :matched_word, :rank, :dictionary_name, :reversed,
  :l33t, :sub, :sub_display, :guesses, :guesses_log10, :base_guesses,
  :uppercase_variations, :l33t_variations, :base_token, :repeat_count,
  :sequence_name, :sequence_space, :ascending, :graph, :turns, :shifted_count,
  :year, :month, :day, :separator
) do
  def initialize(
    pattern: nil, i: nil, j: nil, token: nil, matched_word: nil, rank: nil,
    dictionary_name: nil, reversed: nil, l33t: nil, sub: nil,
    sub_display: nil, guesses: nil, guesses_log10: nil, base_guesses: nil,
    uppercase_variations: nil, l33t_variations: nil, base_token: nil,
    repeat_count: nil, sequence_name: nil, sequence_space: nil,
    ascending: nil, graph: nil, turns: nil, shifted_count: nil,
    year: nil, month: nil, day: nil, separator: nil
  )
    super
  end

  # @return [String] a human-readable representation omitting nil fields and token
  def inspect
    fields = to_h.reject { |k, v| v.nil? || k == :token }.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')
    "#<data #{self.class} #{fields}>"
  end

  # @param pp [PP] the pretty-printer instance
  # @return [void]
  def pretty_print(pp)
    fields = to_h.reject { |_, v| v.nil? }
    pp.group(1, "#<data #{self.class}", '>') do
      fields.each_with_index do |(k, v), i|
        pp.text(',') if i.positive?
        pp.breakable ' '
        pp.text("#{k}=")
        v.pretty_print(pp)
      end
    end
  end
end

#l33tObject (readonly)

Returns the value of attribute l33t

Returns:

  • (Object)

    the current value of l33t



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/zxcvbn/match.rb', line 66

Match = ::Data.define(
  :pattern, :i, :j, :token, :matched_word, :rank, :dictionary_name, :reversed,
  :l33t, :sub, :sub_display, :guesses, :guesses_log10, :base_guesses,
  :uppercase_variations, :l33t_variations, :base_token, :repeat_count,
  :sequence_name, :sequence_space, :ascending, :graph, :turns, :shifted_count,
  :year, :month, :day, :separator
) do
  def initialize(
    pattern: nil, i: nil, j: nil, token: nil, matched_word: nil, rank: nil,
    dictionary_name: nil, reversed: nil, l33t: nil, sub: nil,
    sub_display: nil, guesses: nil, guesses_log10: nil, base_guesses: nil,
    uppercase_variations: nil, l33t_variations: nil, base_token: nil,
    repeat_count: nil, sequence_name: nil, sequence_space: nil,
    ascending: nil, graph: nil, turns: nil, shifted_count: nil,
    year: nil, month: nil, day: nil, separator: nil
  )
    super
  end

  # @return [String] a human-readable representation omitting nil fields and token
  def inspect
    fields = to_h.reject { |k, v| v.nil? || k == :token }.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')
    "#<data #{self.class} #{fields}>"
  end

  # @param pp [PP] the pretty-printer instance
  # @return [void]
  def pretty_print(pp)
    fields = to_h.reject { |_, v| v.nil? }
    pp.group(1, "#<data #{self.class}", '>') do
      fields.each_with_index do |(k, v), i|
        pp.text(',') if i.positive?
        pp.breakable ' '
        pp.text("#{k}=")
        v.pretty_print(pp)
      end
    end
  end
end

#l33t_variationsObject (readonly)

Returns the value of attribute l33t_variations

Returns:

  • (Object)

    the current value of l33t_variations



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/zxcvbn/match.rb', line 66

Match = ::Data.define(
  :pattern, :i, :j, :token, :matched_word, :rank, :dictionary_name, :reversed,
  :l33t, :sub, :sub_display, :guesses, :guesses_log10, :base_guesses,
  :uppercase_variations, :l33t_variations, :base_token, :repeat_count,
  :sequence_name, :sequence_space, :ascending, :graph, :turns, :shifted_count,
  :year, :month, :day, :separator
) do
  def initialize(
    pattern: nil, i: nil, j: nil, token: nil, matched_word: nil, rank: nil,
    dictionary_name: nil, reversed: nil, l33t: nil, sub: nil,
    sub_display: nil, guesses: nil, guesses_log10: nil, base_guesses: nil,
    uppercase_variations: nil, l33t_variations: nil, base_token: nil,
    repeat_count: nil, sequence_name: nil, sequence_space: nil,
    ascending: nil, graph: nil, turns: nil, shifted_count: nil,
    year: nil, month: nil, day: nil, separator: nil
  )
    super
  end

  # @return [String] a human-readable representation omitting nil fields and token
  def inspect
    fields = to_h.reject { |k, v| v.nil? || k == :token }.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')
    "#<data #{self.class} #{fields}>"
  end

  # @param pp [PP] the pretty-printer instance
  # @return [void]
  def pretty_print(pp)
    fields = to_h.reject { |_, v| v.nil? }
    pp.group(1, "#<data #{self.class}", '>') do
      fields.each_with_index do |(k, v), i|
        pp.text(',') if i.positive?
        pp.breakable ' '
        pp.text("#{k}=")
        v.pretty_print(pp)
      end
    end
  end
end

#matched_wordObject (readonly)

Returns the value of attribute matched_word

Returns:

  • (Object)

    the current value of matched_word



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/zxcvbn/match.rb', line 66

Match = ::Data.define(
  :pattern, :i, :j, :token, :matched_word, :rank, :dictionary_name, :reversed,
  :l33t, :sub, :sub_display, :guesses, :guesses_log10, :base_guesses,
  :uppercase_variations, :l33t_variations, :base_token, :repeat_count,
  :sequence_name, :sequence_space, :ascending, :graph, :turns, :shifted_count,
  :year, :month, :day, :separator
) do
  def initialize(
    pattern: nil, i: nil, j: nil, token: nil, matched_word: nil, rank: nil,
    dictionary_name: nil, reversed: nil, l33t: nil, sub: nil,
    sub_display: nil, guesses: nil, guesses_log10: nil, base_guesses: nil,
    uppercase_variations: nil, l33t_variations: nil, base_token: nil,
    repeat_count: nil, sequence_name: nil, sequence_space: nil,
    ascending: nil, graph: nil, turns: nil, shifted_count: nil,
    year: nil, month: nil, day: nil, separator: nil
  )
    super
  end

  # @return [String] a human-readable representation omitting nil fields and token
  def inspect
    fields = to_h.reject { |k, v| v.nil? || k == :token }.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')
    "#<data #{self.class} #{fields}>"
  end

  # @param pp [PP] the pretty-printer instance
  # @return [void]
  def pretty_print(pp)
    fields = to_h.reject { |_, v| v.nil? }
    pp.group(1, "#<data #{self.class}", '>') do
      fields.each_with_index do |(k, v), i|
        pp.text(',') if i.positive?
        pp.breakable ' '
        pp.text("#{k}=")
        v.pretty_print(pp)
      end
    end
  end
end

#monthObject (readonly)

Returns the value of attribute month

Returns:

  • (Object)

    the current value of month



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/zxcvbn/match.rb', line 66

Match = ::Data.define(
  :pattern, :i, :j, :token, :matched_word, :rank, :dictionary_name, :reversed,
  :l33t, :sub, :sub_display, :guesses, :guesses_log10, :base_guesses,
  :uppercase_variations, :l33t_variations, :base_token, :repeat_count,
  :sequence_name, :sequence_space, :ascending, :graph, :turns, :shifted_count,
  :year, :month, :day, :separator
) do
  def initialize(
    pattern: nil, i: nil, j: nil, token: nil, matched_word: nil, rank: nil,
    dictionary_name: nil, reversed: nil, l33t: nil, sub: nil,
    sub_display: nil, guesses: nil, guesses_log10: nil, base_guesses: nil,
    uppercase_variations: nil, l33t_variations: nil, base_token: nil,
    repeat_count: nil, sequence_name: nil, sequence_space: nil,
    ascending: nil, graph: nil, turns: nil, shifted_count: nil,
    year: nil, month: nil, day: nil, separator: nil
  )
    super
  end

  # @return [String] a human-readable representation omitting nil fields and token
  def inspect
    fields = to_h.reject { |k, v| v.nil? || k == :token }.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')
    "#<data #{self.class} #{fields}>"
  end

  # @param pp [PP] the pretty-printer instance
  # @return [void]
  def pretty_print(pp)
    fields = to_h.reject { |_, v| v.nil? }
    pp.group(1, "#<data #{self.class}", '>') do
      fields.each_with_index do |(k, v), i|
        pp.text(',') if i.positive?
        pp.breakable ' '
        pp.text("#{k}=")
        v.pretty_print(pp)
      end
    end
  end
end

#patternObject (readonly)

Returns the value of attribute pattern

Returns:

  • (Object)

    the current value of pattern



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/zxcvbn/match.rb', line 66

Match = ::Data.define(
  :pattern, :i, :j, :token, :matched_word, :rank, :dictionary_name, :reversed,
  :l33t, :sub, :sub_display, :guesses, :guesses_log10, :base_guesses,
  :uppercase_variations, :l33t_variations, :base_token, :repeat_count,
  :sequence_name, :sequence_space, :ascending, :graph, :turns, :shifted_count,
  :year, :month, :day, :separator
) do
  def initialize(
    pattern: nil, i: nil, j: nil, token: nil, matched_word: nil, rank: nil,
    dictionary_name: nil, reversed: nil, l33t: nil, sub: nil,
    sub_display: nil, guesses: nil, guesses_log10: nil, base_guesses: nil,
    uppercase_variations: nil, l33t_variations: nil, base_token: nil,
    repeat_count: nil, sequence_name: nil, sequence_space: nil,
    ascending: nil, graph: nil, turns: nil, shifted_count: nil,
    year: nil, month: nil, day: nil, separator: nil
  )
    super
  end

  # @return [String] a human-readable representation omitting nil fields and token
  def inspect
    fields = to_h.reject { |k, v| v.nil? || k == :token }.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')
    "#<data #{self.class} #{fields}>"
  end

  # @param pp [PP] the pretty-printer instance
  # @return [void]
  def pretty_print(pp)
    fields = to_h.reject { |_, v| v.nil? }
    pp.group(1, "#<data #{self.class}", '>') do
      fields.each_with_index do |(k, v), i|
        pp.text(',') if i.positive?
        pp.breakable ' '
        pp.text("#{k}=")
        v.pretty_print(pp)
      end
    end
  end
end

#rankObject (readonly)

Returns the value of attribute rank

Returns:

  • (Object)

    the current value of rank



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/zxcvbn/match.rb', line 66

Match = ::Data.define(
  :pattern, :i, :j, :token, :matched_word, :rank, :dictionary_name, :reversed,
  :l33t, :sub, :sub_display, :guesses, :guesses_log10, :base_guesses,
  :uppercase_variations, :l33t_variations, :base_token, :repeat_count,
  :sequence_name, :sequence_space, :ascending, :graph, :turns, :shifted_count,
  :year, :month, :day, :separator
) do
  def initialize(
    pattern: nil, i: nil, j: nil, token: nil, matched_word: nil, rank: nil,
    dictionary_name: nil, reversed: nil, l33t: nil, sub: nil,
    sub_display: nil, guesses: nil, guesses_log10: nil, base_guesses: nil,
    uppercase_variations: nil, l33t_variations: nil, base_token: nil,
    repeat_count: nil, sequence_name: nil, sequence_space: nil,
    ascending: nil, graph: nil, turns: nil, shifted_count: nil,
    year: nil, month: nil, day: nil, separator: nil
  )
    super
  end

  # @return [String] a human-readable representation omitting nil fields and token
  def inspect
    fields = to_h.reject { |k, v| v.nil? || k == :token }.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')
    "#<data #{self.class} #{fields}>"
  end

  # @param pp [PP] the pretty-printer instance
  # @return [void]
  def pretty_print(pp)
    fields = to_h.reject { |_, v| v.nil? }
    pp.group(1, "#<data #{self.class}", '>') do
      fields.each_with_index do |(k, v), i|
        pp.text(',') if i.positive?
        pp.breakable ' '
        pp.text("#{k}=")
        v.pretty_print(pp)
      end
    end
  end
end

#repeat_countObject (readonly)

Returns the value of attribute repeat_count

Returns:

  • (Object)

    the current value of repeat_count



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/zxcvbn/match.rb', line 66

Match = ::Data.define(
  :pattern, :i, :j, :token, :matched_word, :rank, :dictionary_name, :reversed,
  :l33t, :sub, :sub_display, :guesses, :guesses_log10, :base_guesses,
  :uppercase_variations, :l33t_variations, :base_token, :repeat_count,
  :sequence_name, :sequence_space, :ascending, :graph, :turns, :shifted_count,
  :year, :month, :day, :separator
) do
  def initialize(
    pattern: nil, i: nil, j: nil, token: nil, matched_word: nil, rank: nil,
    dictionary_name: nil, reversed: nil, l33t: nil, sub: nil,
    sub_display: nil, guesses: nil, guesses_log10: nil, base_guesses: nil,
    uppercase_variations: nil, l33t_variations: nil, base_token: nil,
    repeat_count: nil, sequence_name: nil, sequence_space: nil,
    ascending: nil, graph: nil, turns: nil, shifted_count: nil,
    year: nil, month: nil, day: nil, separator: nil
  )
    super
  end

  # @return [String] a human-readable representation omitting nil fields and token
  def inspect
    fields = to_h.reject { |k, v| v.nil? || k == :token }.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')
    "#<data #{self.class} #{fields}>"
  end

  # @param pp [PP] the pretty-printer instance
  # @return [void]
  def pretty_print(pp)
    fields = to_h.reject { |_, v| v.nil? }
    pp.group(1, "#<data #{self.class}", '>') do
      fields.each_with_index do |(k, v), i|
        pp.text(',') if i.positive?
        pp.breakable ' '
        pp.text("#{k}=")
        v.pretty_print(pp)
      end
    end
  end
end

#reversedObject (readonly)

Returns the value of attribute reversed

Returns:

  • (Object)

    the current value of reversed



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/zxcvbn/match.rb', line 66

Match = ::Data.define(
  :pattern, :i, :j, :token, :matched_word, :rank, :dictionary_name, :reversed,
  :l33t, :sub, :sub_display, :guesses, :guesses_log10, :base_guesses,
  :uppercase_variations, :l33t_variations, :base_token, :repeat_count,
  :sequence_name, :sequence_space, :ascending, :graph, :turns, :shifted_count,
  :year, :month, :day, :separator
) do
  def initialize(
    pattern: nil, i: nil, j: nil, token: nil, matched_word: nil, rank: nil,
    dictionary_name: nil, reversed: nil, l33t: nil, sub: nil,
    sub_display: nil, guesses: nil, guesses_log10: nil, base_guesses: nil,
    uppercase_variations: nil, l33t_variations: nil, base_token: nil,
    repeat_count: nil, sequence_name: nil, sequence_space: nil,
    ascending: nil, graph: nil, turns: nil, shifted_count: nil,
    year: nil, month: nil, day: nil, separator: nil
  )
    super
  end

  # @return [String] a human-readable representation omitting nil fields and token
  def inspect
    fields = to_h.reject { |k, v| v.nil? || k == :token }.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')
    "#<data #{self.class} #{fields}>"
  end

  # @param pp [PP] the pretty-printer instance
  # @return [void]
  def pretty_print(pp)
    fields = to_h.reject { |_, v| v.nil? }
    pp.group(1, "#<data #{self.class}", '>') do
      fields.each_with_index do |(k, v), i|
        pp.text(',') if i.positive?
        pp.breakable ' '
        pp.text("#{k}=")
        v.pretty_print(pp)
      end
    end
  end
end

#separatorObject (readonly)

Returns the value of attribute separator

Returns:

  • (Object)

    the current value of separator



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/zxcvbn/match.rb', line 66

Match = ::Data.define(
  :pattern, :i, :j, :token, :matched_word, :rank, :dictionary_name, :reversed,
  :l33t, :sub, :sub_display, :guesses, :guesses_log10, :base_guesses,
  :uppercase_variations, :l33t_variations, :base_token, :repeat_count,
  :sequence_name, :sequence_space, :ascending, :graph, :turns, :shifted_count,
  :year, :month, :day, :separator
) do
  def initialize(
    pattern: nil, i: nil, j: nil, token: nil, matched_word: nil, rank: nil,
    dictionary_name: nil, reversed: nil, l33t: nil, sub: nil,
    sub_display: nil, guesses: nil, guesses_log10: nil, base_guesses: nil,
    uppercase_variations: nil, l33t_variations: nil, base_token: nil,
    repeat_count: nil, sequence_name: nil, sequence_space: nil,
    ascending: nil, graph: nil, turns: nil, shifted_count: nil,
    year: nil, month: nil, day: nil, separator: nil
  )
    super
  end

  # @return [String] a human-readable representation omitting nil fields and token
  def inspect
    fields = to_h.reject { |k, v| v.nil? || k == :token }.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')
    "#<data #{self.class} #{fields}>"
  end

  # @param pp [PP] the pretty-printer instance
  # @return [void]
  def pretty_print(pp)
    fields = to_h.reject { |_, v| v.nil? }
    pp.group(1, "#<data #{self.class}", '>') do
      fields.each_with_index do |(k, v), i|
        pp.text(',') if i.positive?
        pp.breakable ' '
        pp.text("#{k}=")
        v.pretty_print(pp)
      end
    end
  end
end

#sequence_nameObject (readonly)

Returns the value of attribute sequence_name

Returns:

  • (Object)

    the current value of sequence_name



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/zxcvbn/match.rb', line 66

Match = ::Data.define(
  :pattern, :i, :j, :token, :matched_word, :rank, :dictionary_name, :reversed,
  :l33t, :sub, :sub_display, :guesses, :guesses_log10, :base_guesses,
  :uppercase_variations, :l33t_variations, :base_token, :repeat_count,
  :sequence_name, :sequence_space, :ascending, :graph, :turns, :shifted_count,
  :year, :month, :day, :separator
) do
  def initialize(
    pattern: nil, i: nil, j: nil, token: nil, matched_word: nil, rank: nil,
    dictionary_name: nil, reversed: nil, l33t: nil, sub: nil,
    sub_display: nil, guesses: nil, guesses_log10: nil, base_guesses: nil,
    uppercase_variations: nil, l33t_variations: nil, base_token: nil,
    repeat_count: nil, sequence_name: nil, sequence_space: nil,
    ascending: nil, graph: nil, turns: nil, shifted_count: nil,
    year: nil, month: nil, day: nil, separator: nil
  )
    super
  end

  # @return [String] a human-readable representation omitting nil fields and token
  def inspect
    fields = to_h.reject { |k, v| v.nil? || k == :token }.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')
    "#<data #{self.class} #{fields}>"
  end

  # @param pp [PP] the pretty-printer instance
  # @return [void]
  def pretty_print(pp)
    fields = to_h.reject { |_, v| v.nil? }
    pp.group(1, "#<data #{self.class}", '>') do
      fields.each_with_index do |(k, v), i|
        pp.text(',') if i.positive?
        pp.breakable ' '
        pp.text("#{k}=")
        v.pretty_print(pp)
      end
    end
  end
end

#sequence_spaceObject (readonly)

Returns the value of attribute sequence_space

Returns:

  • (Object)

    the current value of sequence_space



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/zxcvbn/match.rb', line 66

Match = ::Data.define(
  :pattern, :i, :j, :token, :matched_word, :rank, :dictionary_name, :reversed,
  :l33t, :sub, :sub_display, :guesses, :guesses_log10, :base_guesses,
  :uppercase_variations, :l33t_variations, :base_token, :repeat_count,
  :sequence_name, :sequence_space, :ascending, :graph, :turns, :shifted_count,
  :year, :month, :day, :separator
) do
  def initialize(
    pattern: nil, i: nil, j: nil, token: nil, matched_word: nil, rank: nil,
    dictionary_name: nil, reversed: nil, l33t: nil, sub: nil,
    sub_display: nil, guesses: nil, guesses_log10: nil, base_guesses: nil,
    uppercase_variations: nil, l33t_variations: nil, base_token: nil,
    repeat_count: nil, sequence_name: nil, sequence_space: nil,
    ascending: nil, graph: nil, turns: nil, shifted_count: nil,
    year: nil, month: nil, day: nil, separator: nil
  )
    super
  end

  # @return [String] a human-readable representation omitting nil fields and token
  def inspect
    fields = to_h.reject { |k, v| v.nil? || k == :token }.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')
    "#<data #{self.class} #{fields}>"
  end

  # @param pp [PP] the pretty-printer instance
  # @return [void]
  def pretty_print(pp)
    fields = to_h.reject { |_, v| v.nil? }
    pp.group(1, "#<data #{self.class}", '>') do
      fields.each_with_index do |(k, v), i|
        pp.text(',') if i.positive?
        pp.breakable ' '
        pp.text("#{k}=")
        v.pretty_print(pp)
      end
    end
  end
end

#shifted_countObject (readonly)

Returns the value of attribute shifted_count

Returns:

  • (Object)

    the current value of shifted_count



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/zxcvbn/match.rb', line 66

Match = ::Data.define(
  :pattern, :i, :j, :token, :matched_word, :rank, :dictionary_name, :reversed,
  :l33t, :sub, :sub_display, :guesses, :guesses_log10, :base_guesses,
  :uppercase_variations, :l33t_variations, :base_token, :repeat_count,
  :sequence_name, :sequence_space, :ascending, :graph, :turns, :shifted_count,
  :year, :month, :day, :separator
) do
  def initialize(
    pattern: nil, i: nil, j: nil, token: nil, matched_word: nil, rank: nil,
    dictionary_name: nil, reversed: nil, l33t: nil, sub: nil,
    sub_display: nil, guesses: nil, guesses_log10: nil, base_guesses: nil,
    uppercase_variations: nil, l33t_variations: nil, base_token: nil,
    repeat_count: nil, sequence_name: nil, sequence_space: nil,
    ascending: nil, graph: nil, turns: nil, shifted_count: nil,
    year: nil, month: nil, day: nil, separator: nil
  )
    super
  end

  # @return [String] a human-readable representation omitting nil fields and token
  def inspect
    fields = to_h.reject { |k, v| v.nil? || k == :token }.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')
    "#<data #{self.class} #{fields}>"
  end

  # @param pp [PP] the pretty-printer instance
  # @return [void]
  def pretty_print(pp)
    fields = to_h.reject { |_, v| v.nil? }
    pp.group(1, "#<data #{self.class}", '>') do
      fields.each_with_index do |(k, v), i|
        pp.text(',') if i.positive?
        pp.breakable ' '
        pp.text("#{k}=")
        v.pretty_print(pp)
      end
    end
  end
end

#subObject (readonly)

Returns the value of attribute sub

Returns:

  • (Object)

    the current value of sub



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/zxcvbn/match.rb', line 66

Match = ::Data.define(
  :pattern, :i, :j, :token, :matched_word, :rank, :dictionary_name, :reversed,
  :l33t, :sub, :sub_display, :guesses, :guesses_log10, :base_guesses,
  :uppercase_variations, :l33t_variations, :base_token, :repeat_count,
  :sequence_name, :sequence_space, :ascending, :graph, :turns, :shifted_count,
  :year, :month, :day, :separator
) do
  def initialize(
    pattern: nil, i: nil, j: nil, token: nil, matched_word: nil, rank: nil,
    dictionary_name: nil, reversed: nil, l33t: nil, sub: nil,
    sub_display: nil, guesses: nil, guesses_log10: nil, base_guesses: nil,
    uppercase_variations: nil, l33t_variations: nil, base_token: nil,
    repeat_count: nil, sequence_name: nil, sequence_space: nil,
    ascending: nil, graph: nil, turns: nil, shifted_count: nil,
    year: nil, month: nil, day: nil, separator: nil
  )
    super
  end

  # @return [String] a human-readable representation omitting nil fields and token
  def inspect
    fields = to_h.reject { |k, v| v.nil? || k == :token }.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')
    "#<data #{self.class} #{fields}>"
  end

  # @param pp [PP] the pretty-printer instance
  # @return [void]
  def pretty_print(pp)
    fields = to_h.reject { |_, v| v.nil? }
    pp.group(1, "#<data #{self.class}", '>') do
      fields.each_with_index do |(k, v), i|
        pp.text(',') if i.positive?
        pp.breakable ' '
        pp.text("#{k}=")
        v.pretty_print(pp)
      end
    end
  end
end

#sub_displayObject (readonly)

Returns the value of attribute sub_display

Returns:

  • (Object)

    the current value of sub_display



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/zxcvbn/match.rb', line 66

Match = ::Data.define(
  :pattern, :i, :j, :token, :matched_word, :rank, :dictionary_name, :reversed,
  :l33t, :sub, :sub_display, :guesses, :guesses_log10, :base_guesses,
  :uppercase_variations, :l33t_variations, :base_token, :repeat_count,
  :sequence_name, :sequence_space, :ascending, :graph, :turns, :shifted_count,
  :year, :month, :day, :separator
) do
  def initialize(
    pattern: nil, i: nil, j: nil, token: nil, matched_word: nil, rank: nil,
    dictionary_name: nil, reversed: nil, l33t: nil, sub: nil,
    sub_display: nil, guesses: nil, guesses_log10: nil, base_guesses: nil,
    uppercase_variations: nil, l33t_variations: nil, base_token: nil,
    repeat_count: nil, sequence_name: nil, sequence_space: nil,
    ascending: nil, graph: nil, turns: nil, shifted_count: nil,
    year: nil, month: nil, day: nil, separator: nil
  )
    super
  end

  # @return [String] a human-readable representation omitting nil fields and token
  def inspect
    fields = to_h.reject { |k, v| v.nil? || k == :token }.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')
    "#<data #{self.class} #{fields}>"
  end

  # @param pp [PP] the pretty-printer instance
  # @return [void]
  def pretty_print(pp)
    fields = to_h.reject { |_, v| v.nil? }
    pp.group(1, "#<data #{self.class}", '>') do
      fields.each_with_index do |(k, v), i|
        pp.text(',') if i.positive?
        pp.breakable ' '
        pp.text("#{k}=")
        v.pretty_print(pp)
      end
    end
  end
end

#tokenObject (readonly)

Returns the value of attribute token

Returns:

  • (Object)

    the current value of token



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/zxcvbn/match.rb', line 66

Match = ::Data.define(
  :pattern, :i, :j, :token, :matched_word, :rank, :dictionary_name, :reversed,
  :l33t, :sub, :sub_display, :guesses, :guesses_log10, :base_guesses,
  :uppercase_variations, :l33t_variations, :base_token, :repeat_count,
  :sequence_name, :sequence_space, :ascending, :graph, :turns, :shifted_count,
  :year, :month, :day, :separator
) do
  def initialize(
    pattern: nil, i: nil, j: nil, token: nil, matched_word: nil, rank: nil,
    dictionary_name: nil, reversed: nil, l33t: nil, sub: nil,
    sub_display: nil, guesses: nil, guesses_log10: nil, base_guesses: nil,
    uppercase_variations: nil, l33t_variations: nil, base_token: nil,
    repeat_count: nil, sequence_name: nil, sequence_space: nil,
    ascending: nil, graph: nil, turns: nil, shifted_count: nil,
    year: nil, month: nil, day: nil, separator: nil
  )
    super
  end

  # @return [String] a human-readable representation omitting nil fields and token
  def inspect
    fields = to_h.reject { |k, v| v.nil? || k == :token }.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')
    "#<data #{self.class} #{fields}>"
  end

  # @param pp [PP] the pretty-printer instance
  # @return [void]
  def pretty_print(pp)
    fields = to_h.reject { |_, v| v.nil? }
    pp.group(1, "#<data #{self.class}", '>') do
      fields.each_with_index do |(k, v), i|
        pp.text(',') if i.positive?
        pp.breakable ' '
        pp.text("#{k}=")
        v.pretty_print(pp)
      end
    end
  end
end

#turnsObject (readonly)

Returns the value of attribute turns

Returns:

  • (Object)

    the current value of turns



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/zxcvbn/match.rb', line 66

Match = ::Data.define(
  :pattern, :i, :j, :token, :matched_word, :rank, :dictionary_name, :reversed,
  :l33t, :sub, :sub_display, :guesses, :guesses_log10, :base_guesses,
  :uppercase_variations, :l33t_variations, :base_token, :repeat_count,
  :sequence_name, :sequence_space, :ascending, :graph, :turns, :shifted_count,
  :year, :month, :day, :separator
) do
  def initialize(
    pattern: nil, i: nil, j: nil, token: nil, matched_word: nil, rank: nil,
    dictionary_name: nil, reversed: nil, l33t: nil, sub: nil,
    sub_display: nil, guesses: nil, guesses_log10: nil, base_guesses: nil,
    uppercase_variations: nil, l33t_variations: nil, base_token: nil,
    repeat_count: nil, sequence_name: nil, sequence_space: nil,
    ascending: nil, graph: nil, turns: nil, shifted_count: nil,
    year: nil, month: nil, day: nil, separator: nil
  )
    super
  end

  # @return [String] a human-readable representation omitting nil fields and token
  def inspect
    fields = to_h.reject { |k, v| v.nil? || k == :token }.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')
    "#<data #{self.class} #{fields}>"
  end

  # @param pp [PP] the pretty-printer instance
  # @return [void]
  def pretty_print(pp)
    fields = to_h.reject { |_, v| v.nil? }
    pp.group(1, "#<data #{self.class}", '>') do
      fields.each_with_index do |(k, v), i|
        pp.text(',') if i.positive?
        pp.breakable ' '
        pp.text("#{k}=")
        v.pretty_print(pp)
      end
    end
  end
end

#uppercase_variationsObject (readonly)

Returns the value of attribute uppercase_variations

Returns:

  • (Object)

    the current value of uppercase_variations



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/zxcvbn/match.rb', line 66

Match = ::Data.define(
  :pattern, :i, :j, :token, :matched_word, :rank, :dictionary_name, :reversed,
  :l33t, :sub, :sub_display, :guesses, :guesses_log10, :base_guesses,
  :uppercase_variations, :l33t_variations, :base_token, :repeat_count,
  :sequence_name, :sequence_space, :ascending, :graph, :turns, :shifted_count,
  :year, :month, :day, :separator
) do
  def initialize(
    pattern: nil, i: nil, j: nil, token: nil, matched_word: nil, rank: nil,
    dictionary_name: nil, reversed: nil, l33t: nil, sub: nil,
    sub_display: nil, guesses: nil, guesses_log10: nil, base_guesses: nil,
    uppercase_variations: nil, l33t_variations: nil, base_token: nil,
    repeat_count: nil, sequence_name: nil, sequence_space: nil,
    ascending: nil, graph: nil, turns: nil, shifted_count: nil,
    year: nil, month: nil, day: nil, separator: nil
  )
    super
  end

  # @return [String] a human-readable representation omitting nil fields and token
  def inspect
    fields = to_h.reject { |k, v| v.nil? || k == :token }.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')
    "#<data #{self.class} #{fields}>"
  end

  # @param pp [PP] the pretty-printer instance
  # @return [void]
  def pretty_print(pp)
    fields = to_h.reject { |_, v| v.nil? }
    pp.group(1, "#<data #{self.class}", '>') do
      fields.each_with_index do |(k, v), i|
        pp.text(',') if i.positive?
        pp.breakable ' '
        pp.text("#{k}=")
        v.pretty_print(pp)
      end
    end
  end
end

#yearObject (readonly)

Returns the value of attribute year

Returns:

  • (Object)

    the current value of year



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/zxcvbn/match.rb', line 66

Match = ::Data.define(
  :pattern, :i, :j, :token, :matched_word, :rank, :dictionary_name, :reversed,
  :l33t, :sub, :sub_display, :guesses, :guesses_log10, :base_guesses,
  :uppercase_variations, :l33t_variations, :base_token, :repeat_count,
  :sequence_name, :sequence_space, :ascending, :graph, :turns, :shifted_count,
  :year, :month, :day, :separator
) do
  def initialize(
    pattern: nil, i: nil, j: nil, token: nil, matched_word: nil, rank: nil,
    dictionary_name: nil, reversed: nil, l33t: nil, sub: nil,
    sub_display: nil, guesses: nil, guesses_log10: nil, base_guesses: nil,
    uppercase_variations: nil, l33t_variations: nil, base_token: nil,
    repeat_count: nil, sequence_name: nil, sequence_space: nil,
    ascending: nil, graph: nil, turns: nil, shifted_count: nil,
    year: nil, month: nil, day: nil, separator: nil
  )
    super
  end

  # @return [String] a human-readable representation omitting nil fields and token
  def inspect
    fields = to_h.reject { |k, v| v.nil? || k == :token }.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')
    "#<data #{self.class} #{fields}>"
  end

  # @param pp [PP] the pretty-printer instance
  # @return [void]
  def pretty_print(pp)
    fields = to_h.reject { |_, v| v.nil? }
    pp.group(1, "#<data #{self.class}", '>') do
      fields.each_with_index do |(k, v), i|
        pp.text(',') if i.positive?
        pp.breakable ' '
        pp.text("#{k}=")
        v.pretty_print(pp)
      end
    end
  end
end

Instance Method Details

#inspectString

Returns a human-readable representation omitting nil fields and token.

Returns:

  • (String)

    a human-readable representation omitting nil fields and token



86
87
88
89
# File 'lib/zxcvbn/match.rb', line 86

def inspect
  fields = to_h.reject { |k, v| v.nil? || k == :token }.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')
  "#<data #{self.class} #{fields}>"
end

#pretty_print(pp) ⇒ void

This method returns an undefined value.

Parameters:

  • pp (PP)

    the pretty-printer instance



93
94
95
96
97
98
99
100
101
102
103
# File 'lib/zxcvbn/match.rb', line 93

def pretty_print(pp)
  fields = to_h.reject { |_, v| v.nil? }
  pp.group(1, "#<data #{self.class}", '>') do
    fields.each_with_index do |(k, v), i|
      pp.text(',') if i.positive?
      pp.breakable ' '
      pp.text("#{k}=")
      v.pretty_print(pp)
    end
  end
end