Sha256: dfc329b9bee2645ea55fcf6f18fe0a8d277909f5d25b6bd8d46d4b52a6e6a31e
Contents?: true
Size: 447 Bytes
Versions: 11
Compression:
Stored size: 447 Bytes
Contents
# frozen_string_literal: true module OpenApi module Helpers def fusion proc { |a, b| a.deep_merge!(b) { |common_key, va, vb| common_key == :required ? va + vb : vb } } end def truly_present?(obj) obj == false || obj.present? end def value_present proc { |_, v| truly_present? v } end def reducing(*values) values.compact.reduce(processed, :merge!).keep_if &value_present end end end
Version data entries
11 entries across 11 versions & 1 rubygems