Sha256: d4587c78f1e2d3b19a9bbef7d26054b408f8cbca9ff1f2910b4118948dc4d927
Contents?: true
Size: 423 Bytes
Versions: 8
Compression:
Stored size: 423 Bytes
Contents
# frozen_string_literal: true require 'creditsafe/base_model' require 'creditsafe/models/activity' module Creditsafe module Models class ActivityClassification < BaseModel attributes :classification, :activities def self.build(json:) super.tap do |record| record.activities = json.fetch(:activities, []).map { |act| Activity.build(json: act) } end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems