Sha256: 1018c369a9263389b476c0516f70327515a50c3b0712a9cd615b370d517adfc3
Contents?: true
Size: 507 Bytes
Versions: 12
Compression:
Stored size: 507 Bytes
Contents
# frozen_string_literal: true require_relative './../../utils/response' module Sourcescrub # Get the data from API module Models # Entity class Entity include ::Sourcescrub::Utils::Response def fields field_ids.map(&:to_sym) end def parse_response(response) dynamic_attributes(self, field_ids, response) self end def as_json fields.each_with_object({}) { |item, hash| hash[item] = send(item) } end end end end
Version data entries
12 entries across 12 versions & 1 rubygems