Sha256: 34a08a4a8653828b360e53cfeb6a703517688bb0e3b48cc7b62a6d7f24004795
Contents?: true
Size: 332 Bytes
Versions: 16
Compression:
Stored size: 332 Bytes
Contents
# frozen_string_literal: true module ImmutableStructEx # Makes a struct immutable when extended. module Immutable class << self def extended(struct) [:[], *struct.members].each do |method| struct.instance_eval do undef :"#{method}=" end end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems