lib/thread_safe/util/volatile.rb
Method attr_volatile
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def attr_volatile(*attr_names)
return if attr_names.empty?
include(Module.new do
atomic_ref_setup = attr_names.map {|attr_name| "@__#{attr_name} = ThreadSafe::Util::AtomicReference.new"}
initialize_copy_setup = attr_names.zip(atomic_ref_setup).map do |attr_name, ref_setup|