Class: Zxcvbn::Match
- Inherits:
-
Object
- Object
- Zxcvbn::Match
- Defined in:
- lib/zxcvbn/match.rb
Instance Attribute Summary collapse
-
#ascending ⇒ Object
Returns the value of attribute ascending.
-
#base_entropy ⇒ Object
Returns the value of attribute base_entropy.
-
#cardinality ⇒ Object
Returns the value of attribute cardinality.
-
#day ⇒ Object
Returns the value of attribute day.
-
#dictionary_name ⇒ Object
Returns the value of attribute dictionary_name.
-
#entropy ⇒ Object
Returns the value of attribute entropy.
-
#graph ⇒ Object
Returns the value of attribute graph.
-
#i ⇒ Object
Returns the value of attribute i.
-
#j ⇒ Object
Returns the value of attribute j.
-
#l ⇒ Object
Returns the value of attribute l.
-
#l33t ⇒ Object
Returns the value of attribute l33t.
-
#l33t_entropy ⇒ Object
Returns the value of attribute l33t_entropy.
-
#matched_word ⇒ Object
Returns the value of attribute matched_word.
-
#month ⇒ Object
Returns the value of attribute month.
-
#offset ⇒ Object
Returns the value of attribute offset.
-
#pattern ⇒ Object
Returns the value of attribute pattern.
-
#rank ⇒ Object
Returns the value of attribute rank.
-
#repeated_char ⇒ Object
Returns the value of attribute repeated_char.
-
#reversed ⇒ Object
Returns the value of attribute reversed.
-
#separator ⇒ Object
Returns the value of attribute separator.
-
#sequence_name ⇒ Object
Returns the value of attribute sequence_name.
-
#sequence_space ⇒ Object
Returns the value of attribute sequence_space.
-
#shiffted_count ⇒ Object
Returns the value of attribute shiffted_count.
-
#shifted_count ⇒ Object
Returns the value of attribute shifted_count.
-
#sub ⇒ Object
Returns the value of attribute sub.
-
#sub_display ⇒ Object
Returns the value of attribute sub_display.
-
#token ⇒ Object
Returns the value of attribute token.
-
#turns ⇒ Object
Returns the value of attribute turns.
-
#uppercase_entropy ⇒ Object
Returns the value of attribute uppercase_entropy.
-
#year ⇒ Object
Returns the value of attribute year.
Instance Method Summary collapse
-
#initialize(**attributes) ⇒ Match
constructor
A new instance of Match.
- #to_hash ⇒ Object
Constructor Details
#initialize(**attributes) ⇒ Match
Returns a new instance of Match.
12 13 14 15 16 |
# File 'lib/zxcvbn/match.rb', line 12 def initialize(**attributes) attributes.each do |key, value| instance_variable_set("@#{key}", value) end end |
Instance Attribute Details
#ascending ⇒ Object
Returns the value of attribute ascending.
5 6 7 |
# File 'lib/zxcvbn/match.rb', line 5 def ascending @ascending end |
#base_entropy ⇒ Object
Returns the value of attribute base_entropy.
5 6 7 |
# File 'lib/zxcvbn/match.rb', line 5 def base_entropy @base_entropy end |
#cardinality ⇒ Object
Returns the value of attribute cardinality.
5 6 7 |
# File 'lib/zxcvbn/match.rb', line 5 def cardinality @cardinality end |
#day ⇒ Object
Returns the value of attribute day.
5 6 7 |
# File 'lib/zxcvbn/match.rb', line 5 def day @day end |
#dictionary_name ⇒ Object
Returns the value of attribute dictionary_name.
5 6 7 |
# File 'lib/zxcvbn/match.rb', line 5 def dictionary_name @dictionary_name end |
#entropy ⇒ Object
Returns the value of attribute entropy.
5 6 7 |
# File 'lib/zxcvbn/match.rb', line 5 def entropy @entropy end |
#graph ⇒ Object
Returns the value of attribute graph.
5 6 7 |
# File 'lib/zxcvbn/match.rb', line 5 def graph @graph end |
#i ⇒ Object
Returns the value of attribute i.
5 6 7 |
# File 'lib/zxcvbn/match.rb', line 5 def i @i end |
#j ⇒ Object
Returns the value of attribute j.
5 6 7 |
# File 'lib/zxcvbn/match.rb', line 5 def j @j end |
#l ⇒ Object
Returns the value of attribute l.
5 6 7 |
# File 'lib/zxcvbn/match.rb', line 5 def l @l end |
#l33t ⇒ Object
Returns the value of attribute l33t.
5 6 7 |
# File 'lib/zxcvbn/match.rb', line 5 def l33t @l33t end |
#l33t_entropy ⇒ Object
Returns the value of attribute l33t_entropy.
5 6 7 |
# File 'lib/zxcvbn/match.rb', line 5 def l33t_entropy @l33t_entropy end |
#matched_word ⇒ Object
Returns the value of attribute matched_word.
5 6 7 |
# File 'lib/zxcvbn/match.rb', line 5 def matched_word @matched_word end |
#month ⇒ Object
Returns the value of attribute month.
5 6 7 |
# File 'lib/zxcvbn/match.rb', line 5 def month @month end |
#offset ⇒ Object
Returns the value of attribute offset.
5 6 7 |
# File 'lib/zxcvbn/match.rb', line 5 def offset @offset end |
#pattern ⇒ Object
Returns the value of attribute pattern.
5 6 7 |
# File 'lib/zxcvbn/match.rb', line 5 def pattern @pattern end |
#rank ⇒ Object
Returns the value of attribute rank.
5 6 7 |
# File 'lib/zxcvbn/match.rb', line 5 def rank @rank end |
#repeated_char ⇒ Object
Returns the value of attribute repeated_char.
5 6 7 |
# File 'lib/zxcvbn/match.rb', line 5 def repeated_char @repeated_char end |
#reversed ⇒ Object
Returns the value of attribute reversed.
5 6 7 |
# File 'lib/zxcvbn/match.rb', line 5 def reversed @reversed end |
#separator ⇒ Object
Returns the value of attribute separator.
5 6 7 |
# File 'lib/zxcvbn/match.rb', line 5 def separator @separator end |
#sequence_name ⇒ Object
Returns the value of attribute sequence_name.
5 6 7 |
# File 'lib/zxcvbn/match.rb', line 5 def sequence_name @sequence_name end |
#sequence_space ⇒ Object
Returns the value of attribute sequence_space.
5 6 7 |
# File 'lib/zxcvbn/match.rb', line 5 def sequence_space @sequence_space end |
#shiffted_count ⇒ Object
Returns the value of attribute shiffted_count.
5 6 7 |
# File 'lib/zxcvbn/match.rb', line 5 def shiffted_count @shiffted_count end |
#shifted_count ⇒ Object
Returns the value of attribute shifted_count.
5 6 7 |
# File 'lib/zxcvbn/match.rb', line 5 def shifted_count @shifted_count end |
#sub ⇒ Object
Returns the value of attribute sub.
5 6 7 |
# File 'lib/zxcvbn/match.rb', line 5 def sub @sub end |
#sub_display ⇒ Object
Returns the value of attribute sub_display.
5 6 7 |
# File 'lib/zxcvbn/match.rb', line 5 def sub_display @sub_display end |
#token ⇒ Object
Returns the value of attribute token.
5 6 7 |
# File 'lib/zxcvbn/match.rb', line 5 def token @token end |
#turns ⇒ Object
Returns the value of attribute turns.
5 6 7 |
# File 'lib/zxcvbn/match.rb', line 5 def turns @turns end |
#uppercase_entropy ⇒ Object
Returns the value of attribute uppercase_entropy.
5 6 7 |
# File 'lib/zxcvbn/match.rb', line 5 def uppercase_entropy @uppercase_entropy end |
#year ⇒ Object
Returns the value of attribute year.
5 6 7 |
# File 'lib/zxcvbn/match.rb', line 5 def year @year end |
Instance Method Details
#to_hash ⇒ Object
18 19 20 21 22 23 |
# File 'lib/zxcvbn/match.rb', line 18 def to_hash instance_variables.sort.each_with_object({}) do |var, hash| key = var.to_s.delete_prefix('@') hash[key] = instance_variable_get(var) end end |