Class: Yes::Core::Aggregate::Dsl::ClassNameConvention
- Inherits:
-
Object
- Object
- Yes::Core::Aggregate::Dsl::ClassNameConvention
- Defined in:
- lib/yes/core/aggregate/dsl/class_name_convention.rb
Overview
Handles the naming conventions for aggregate-related classes
Instance Method Summary collapse
-
#class_name_for(type, name) ⇒ String
Returns the conventional class name for a given type and name.
-
#initialize(context:, aggregate:) ⇒ ClassNameConvention
constructor
A new instance of ClassNameConvention.
Constructor Details
#initialize(context:, aggregate:) ⇒ ClassNameConvention
Returns a new instance of ClassNameConvention.
16 17 18 19 |
# File 'lib/yes/core/aggregate/dsl/class_name_convention.rb', line 16 def initialize(context:, aggregate:) @context = context @aggregate = aggregate end |
Instance Method Details
#class_name_for(type, name) ⇒ String
Returns the conventional class name for a given type and name
26 27 28 |
# File 'lib/yes/core/aggregate/dsl/class_name_convention.rb', line 26 def class_name_for(type, name) send(:"#{type}_class_name", name) end |