Class: Hanami::Model::RelationName Private
- Inherits:
-
EntityName
- Object
- EntityName
- Hanami::Model::RelationName
- Defined in:
- lib/hanami/model/relation_name.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Conventional name for relations.
Given a repository named SourceFileRepository
, the associated relation will be :source_files
.
Constant Summary
Constants inherited from EntityName
Class Method Summary collapse
-
.new(name) ⇒ String
private
The relation name.
Methods inherited from EntityName
#initialize, #to_s, #underscore
Constructor Details
This class inherits a constructor from Hanami::Model::EntityName
Class Method Details
.new(name) ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the relation name.
21 22 23 |
# File 'lib/hanami/model/relation_name.rb', line 21 def self.new(name) Utils::String.transform(super, :underscore, :pluralize) end |