class ActiveFedora::Reflection::ClassMethods::MacroReflection

def build_association(*options)

be passed to the class's constructor.
Returns a new, unsaved instance of the associated class. +options+ will
def build_association(*options)
  klass.new(*options)
end

def class_name

has_many :clients returns 'Client'
composed_of :balance, :class_name => 'Money' returns 'Money'

Returns the class name for the macro.
def class_name
  @class_name ||= options[:class_name] || derive_class_name
end

def collection?

+has_and_belongs_to_many+, +false+ otherwise.
association. Returns +true+ if the +macro+ is either +has_many+ or
Returns whether or not this association reflection is for a collection
def collection?
  @collection
end

def derive_class_name

def derive_class_name
  class_name = name.to_s.camelize
  class_name = class_name.singularize if collection?
  class_name
end

def initialize(macro, name, options, active_fedora)

def initialize(macro, name, options, active_fedora)
  @macro, @name, @options, @active_fedora = macro, name, options, active_fedora
end

def klass

instead. This allows plugins to hook into association object creation.
a new association object. Use +build_association+ or +create_association+
Note: Do not call +klass.new+ or +klass.create+ to instantiate

# => Book
Author.reflect_on_association(:books).klass

end
has_many :books
class Author < ActiveRecord::Base

Returns the target association's class.
def klass
  #@klass ||= active_record.send(:compute_type, class_name)
  @klass ||= class_name
end

def klass

has_many :clients returns the Client class
composed_of :balance, :class_name => 'Money' returns the Money class

Returns the class for the macro.
def klass
  @klass ||= class_name.constantize
end