Class: Hibp::Parsers::Paste

Inherits:
Json
  • Object
show all
Defined in:
lib/hibp/parsers/paste.rb

Overview

Hibp::Parsers::Paste

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

Instance Method Summary collapse

Instance Method Details

#parse_response(response) ⇒ Array<Hibp::Paste>

Convert raw data to the pastes entities

Parameters:

  • response (Faraday::Response)

    - Response that contains raw data for conversion

Returns:

  • (Array<Hibp::Paste>)

See Also:



19
20
21
# File 'lib/hibp/parsers/paste.rb', line 19

def parse_response(response)
  super(response) { |attributes| Models::Paste.new(attributes) }
end