module ActAsBuddy

This file contains the functions and classes for adding, removing, finding buddies. The core logic is implemented here.

All the module level utility functions are defined here.

Public Class Methods

buddy_attr_accessor(*args) click to toggle source

This defines the basic getter and setter methods on module level.

# File lib/act_as_buddy/utils.rb, line 9
def self.buddy_attr_accessor(*args)
  args.each do |arg|
      self.class_eval("def self.#{arg};@@#{arg};end")
      self.class_eval("def self.#{arg}=(val);@@#{arg}=val;end")
  end
end