Parent

Class/Module Index [+]

Quicksearch

Module

Extensions to Ruby's Module class.

Public Instance Methods

synced_attr_accessor(attr) click to toggle source

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
synced_attr_reader(attribute) click to toggle source

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

[Validate]

Generated with the Darkfish Rdoc Generator 2.