Class: Contrast::Components::ComponentDelegator

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/contrast/components/interface.rb

Overview

All component access is gated through delegators.

One delegator is used by the calling class, so we can tweak outgoing calls.

The second delegator is used by the receiving component, so we can tweak incoming calls.

We use __setobj__ to decide which component implementation to use. This is intended to provide flexibility in design and simplicity in testing.