Sha256: 665780e6797c80566252839d5787be035ccb70ab2123835c8477076f8ceaa970
Contents?: true
Size: 852 Bytes
Versions: 15
Compression:
Stored size: 852 Bytes
Contents
# frozen_string_literal: true require "docile/fallback_context_proxy" module Docile # @api private # # Operates in the same manner as {FallbackContextProxy}, but replacing # the primary `receiver` object with the result of each proxied method. # # This is useful for implementing DSL evaluation for immutable context # objects. # # @see Docile.dsl_eval_immutable # # rubocop:disable Style/MissingRespondToMissing class ChainingFallbackContextProxy < FallbackContextProxy # Proxy methods as in {FallbackContextProxy#method_missing}, replacing # `receiver` with the returned value. def method_missing(method, *args, &block) @__receiver__ = super(method, *args, &block) end ruby2_keywords :method_missing if respond_to?(:ruby2_keywords, true) end # rubocop:enable Style/MissingRespondToMissing end
Version data entries
15 entries across 12 versions & 6 rubygems