class ActiveFedora::Reflection::AbstractReflection
:nodoc:
RuntimeReflection
PolymorphicReflection
ThroughReflection
HasAndBelongsToManyReflection
BelongsToReflection
HasOneReflection
HasManyReflection
AssociationReflection
AggregateReflection
MacroReflection
AbstractReflection
Holds all the methods that are shared between MacroReflection and ThroughReflection.
def alias_candidate(name)
def alias_candidate(name) "#{plural_name}_#{name}" end
def build_association(attributes, &block)
Returns a new, unsaved instance of the associated class. +attributes+ will
def build_association(attributes, &block) klass.new(attributes, &block) end
def chain
def chain collect_join_chain end
def check_validity_of_inverse!
def check_validity_of_inverse! return if polymorphic? raise InverseOfAssociationNotFoundError, self if has_inverse? && inverse_of.nil? end
def class_name
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).to_s end
def constraints
def constraints scope_chain.flatten end
def inverse_of
def inverse_of return unless inverse_name @inverse_of ||= klass._reflect_on_association inverse_name end
def through_reflection?
RuntimeReflection
PolymorphicReflection
ThroughReflection
HasAndBelongsToManyReflection
BelongsToReflection
HasOneReflection
HasManyReflection
AssociationReflection
AggregateReflection
MacroReflection
AbstractReflection
Holds all the methods that are shared between MacroReflection and ThroughReflection.
def through_reflection? false end