Extensions to Ruby's Module class.
Like `attr_accessor`, but for defining a synchronized attribute accessor
@api private
# File lib/cinch/rubyext/module.rb, line 22 def synced_attr_accessor(attr) synced_attr_reader(attr) attr_accessor(attr) end
Like `attr_reader`, but for defining a synchronized attribute reader.
@api private
# File lib/cinch/rubyext/module.rb, line 7 def synced_attr_reader(attribute) undef_method(attribute) define_method(attribute) do attr(attribute) end define_method("#{attribute}_unsynced") do attr(attribute, false, true) end end
Generated with the Darkfish Rdoc Generator 2.