module Conjunction::Prototype

A Prototype is a uniquely named Object with behavior which has been abstracted out into Junction classes.

Public Instance Methods

prototype() click to toggle source
# File lib/conjunction/prototype.rb, line 17
def prototype
  prototype_name&.safe_constantize
end
prototype!() click to toggle source
# File lib/conjunction/prototype.rb, line 13
def prototype!
  prototype or raise NameError, "#{prototype_name} is not defined"
end
prototype_name() click to toggle source
# File lib/conjunction/prototype.rb, line 21
def prototype_name
  try(:model_name)&.name || name
end