module Spira::Reflections
Public Instance Methods
reflect_on_association(association)
click to toggle source
# File lib/spira/reflections.rb, line 15 def reflect_on_association(association) reflections[association].is_a?(AssociationReflection) ? reflections[association] : nil end
reflections()
click to toggle source
Returns a hash containing all AssociationReflection
objects for the current class Example:
Invoice.reflections Account.reflections
# File lib/spira/reflections.rb, line 11 def reflections read_inheritable_attribute(:reflections) || write_inheritable_attribute(:reflections, {}) end