Class: Hibp::Models::Password

Inherits:
Object
  • Object
show all
Includes:
Helpers::AttributeAssignment
Defined in:
lib/hibp/models/password.rb

Overview

Hibp::Models::Password

Represents password by the suffix of and
a count of how many times it appears in the data set

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes) ⇒ Password

Returns a new instance of Password.

Parameters:

  • attributes (Hash)

Options Hash (attributes):

  • :suffix (String)

    - Password suffix(password hash without first five symbols)

  • :occurrences (Integer)

    - Count of how many times suffix appears in the data set



23
24
25
# File 'lib/hibp/models/password.rb', line 23

def initialize(attributes)
  assign_attributes(attributes)
end

Instance Attribute Details

#occurrencesObject

Returns the value of attribute occurrences.



13
14
15
# File 'lib/hibp/models/password.rb', line 13

def occurrences
  @occurrences
end

#suffixObject

Returns the value of attribute suffix.



13
14
15
# File 'lib/hibp/models/password.rb', line 13

def suffix
  @suffix
end