Sha256: 7bb7f669bcb10c9e53e8cd0bce5b372a7ffc72579f23228373873e05597bc1be
Contents?: true
Size: 521 Bytes
Versions: 18
Compression:
Stored size: 521 Bytes
Contents
# frozen_string_literal: true module Kasket module DirtyMixin def kasket_dirty_methods(*method_names) method_names.each do |method| without = "without_kasket_update_#{method}" break if method_defined? without alias_method without, method define_method method do |*args, &block| result = send(without, *args, &block) clear_kasket_indices result end end end alias_method :kasket_dirty_method, :kasket_dirty_methods end end
Version data entries
18 entries across 18 versions & 1 rubygems