class Hibp::Parsers::Paste

Hibp::Parsers::Paste

Used to convert raw API response data to the array of the paste entities

Public Instance Methods

parse_response(response) click to toggle source

Convert raw data to the pastes entities

@param response [Faraday::Response] -

Response that contains raw data for conversion

@see haveibeenpwned.com/API/v3 (The paste model, Sample paste response)

@return [Array<Hibp::Paste>]

Calls superclass method Hibp::Parsers::Json#parse_response
# File lib/hibp/parsers/paste.rb, line 19
def parse_response(response)
  super(response) { |attributes| Models::Paste.new(attributes) }
end