Skip to content

Commit

Permalink
Added extension method for Communicable
Browse files Browse the repository at this point in the history
  • Loading branch information
propensive committed Nov 24, 2023
1 parent 9830c94 commit 7a8c152
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/communicable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ object Communicable:
trait Communicable[-ValueType]:
def message(value: ValueType): Message


extension [ValueType](value: ValueType)(using communicable: Communicable[ValueType])
def communicate: Message = communicable.message(value)

0 comments on commit 7a8c152

Please sign in to comment.