class Structural::Model::Association
Public Instance Methods
hierarchy()
click to toggle source
# File lib/structural/model/association.rb, line 16 def hierarchy @hierarchy ||= Hierarchy.new(model.name, inferred_class_name) end
inferred_class()
click to toggle source
# File lib/structural/model/association.rb, line 8 def inferred_class hierarchy.parent.const_get(inferred_class_name) end
inferred_class_name()
click to toggle source
# File lib/structural/model/association.rb, line 12 def inferred_class_name @inferred_class_name ||= name.to_s.classify end
type()
click to toggle source
# File lib/structural/model/association.rb, line 4 def type options.fetch(:type) { inferred_class } end