Methods

Files

Class/Module Index [+]

Quicksearch

Concurrent::Synchronization::JRubyAttrVolatile::ClassMethods

Public Instance Methods

attr_volatile(*names) click to toggle source
# File lib/concurrent/synchronization/jruby_object.rb, line 12
def attr_volatile(*names)
  names.each do |name|

    ivar = :"@volatile_#{name}"

    class_eval                 def #{name}                  instance_variable_get_volatile(:#{ivar})                end                def #{name}=(value)                  instance_variable_set_volatile(:#{ivar}, value)                end, __FILE__, __LINE__ + 1

  end
  names.map { |n| [n, :"#{n}="] }.flatten
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.