Class: Hibp::Models::Paste
- Inherits:
-
Object
- Object
- Hibp::Models::Paste
- Includes:
- Helpers::AttributeAssignment
- Defined in:
- lib/hibp/models/paste.rb
Overview
Hibp::Models::Paste
Used to construct a "paste" model
A "paste" is information that has been "pasted" to a publicly facing
website designed to share content such as Pastebin.
These services are favoured by hackers due to the ease of anonymously
sharing information and they're frequently the first place a breach appears.
@note In the future, these attributes may expand without the API being versioned.
@see https://haveibeenpwned.com/FAQs
Instance Attribute Summary collapse
-
#date ⇒ Object
Returns the value of attribute date.
-
#email_count ⇒ Object
Returns the value of attribute email_count.
-
#id ⇒ Object
Returns the value of attribute id.
-
#source ⇒ Object
Returns the value of attribute source.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Paste
constructor
A new instance of Paste.
Constructor Details
#initialize(attributes) ⇒ Paste
Returns a new instance of Paste.
57 58 59 |
# File 'lib/hibp/models/paste.rb', line 57 def initialize(attributes) assign_attributes(attributes) end |
Instance Attribute Details
#date ⇒ Object
Returns the value of attribute date.
22 23 24 |
# File 'lib/hibp/models/paste.rb', line 22 def date @date end |
#email_count ⇒ Object
Returns the value of attribute email_count.
22 23 24 |
# File 'lib/hibp/models/paste.rb', line 22 def email_count @email_count end |
#id ⇒ Object
Returns the value of attribute id.
22 23 24 |
# File 'lib/hibp/models/paste.rb', line 22 def id @id end |
#source ⇒ Object
Returns the value of attribute source.
22 23 24 |
# File 'lib/hibp/models/paste.rb', line 22 def source @source end |
#title ⇒ Object
Returns the value of attribute title.
22 23 24 |
# File 'lib/hibp/models/paste.rb', line 22 def title @title end |