Sha256: e1caace29d6418d073a1e5369c1c3b2d52a482b914b9c3865bfff573b006085a
Contents?: true
Size: 718 Bytes
Versions: 20
Compression:
Stored size: 718 Bytes
Contents
# frozen_string_literal: true module TableSync::Receiving class ConfigDecorator extend Forwardable def_delegators :@config, :allow_event? # rubocop:disable Metrics/ParameterLists def initialize(config:, event:, model:, version:, project_id:, raw_data:) @config = config @default_params = { event: event, model: model, version: version, project_id: project_id, raw_data: raw_data, } end # rubocop:enable Metrics/ParameterLists def method_missing(name, **additional_params, &block) value = @config.send(name) value.is_a?(Proc) ? value.call(@default_params.merge(additional_params), &block) : value end end end
Version data entries
20 entries across 20 versions & 1 rubygems