Module: RactorRailsShim::Patches

Defined in:
lib/ractor_rails_shim/patches/active_model_attribute.rb,
lib/ractor_rails_shim/patches/hash_compute_if_absent.rb

Overview

RactorRailsShim::Patches::ActiveModelAttribute — the role object that owns the install step for the three ActiveModel/ActiveRecord attribute patches above (extracted from the facade god module in Step 22.2, Issue #22; POODR §1 SRP).

The three prepend/include calls live here; only their home changes (they were inlined on the facade's _install_active_model_attribute_ patch). The facade method now delegates to .install until Issue #31.

The idempotency flag (@installed) lives on this object, not on the facade. The guard return unless defined?(::ActiveModel::Attribute) is preserved — when ActiveModel is not loaded (e.g. the shim's own unit specs), install is a no-op that still records installed? = true (it ran to completion, the precondition just wasn't met).

Defined Under Namespace

Modules: ActiveModelAttribute, HashComputeIfAbsent