Module: Dunlop::CollectionLookup
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/models/dunlop/collection_lookup.rb
Overview
This module creates a formalized way to facilitate collection lookups. The default convention is that every workflow model has an associated collection with it:
WorkflowInstance::Scenario1::Collection
WorkflowInstance::Scenario2::Collection
OwnerInitialization::Scenario1::Collection
etc...
But since we should be ready for unforseen circumstances a lookup method should be used in stead of a hard namespace lookup.
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#collection_class ⇒ Object
conveniance and proper code smell implementation to avoid self.class calls in places where it does not belong.
Instance Method Details
#collection_class ⇒ Object
conveniance and proper code smell implementation to avoid self.class calls in places where it does not belong
15 16 17 |
# File 'app/models/dunlop/collection_lookup.rb', line 15 def collection_class self.class.collection end |