TypeClass v0.0.1 TypeClass.Utility.Module

Naming convention helpers to help follow TypeClass conventions

Summary

Functions

Generate the module name for the protocol portion of the class. Does not nest Protocols

Functions

to_protocol(base_module)
to_protocol(module) :: module

Generate the module name for the protocol portion of the class. Does not nest Protocols.

Examples

iex> TypeClass.Class.Name.protocol(MyClass.Awesome) MyClass.Awesome.Protocol

iex> TypeClass.Class.Name.protocol(MyClass.Awesome.Protocol) MyClass.Awesome.Protocol