Class: Hibp::Parsers::Breach
Overview
Hibp::Parsers::Breach
Used to convert raw API response data to the breach entity or
array of the entities in case if response data contains multiple breaches
Instance Method Summary collapse
-
#parse_response(response) ⇒ Array<Hibp::Breach>, Hibp::Breach
Convert raw data to the breach entity.
Instance Method Details
#parse_response(response) ⇒ Array<Hibp::Breach>, Hibp::Breach
Convert raw data to the breach entity
21 22 23 24 25 |
# File 'lib/hibp/parsers/breach.rb', line 21 def parse_response(response) super(response) do |attributes| Models::Breach.new(convert_dates!(attributes)) end end |