Simple example on how to implement the typical .call interface for plain ruby service objects.
.call
class Greeter extend ServiceInterface attr_reader :name def initialize(name) @name = name end private def perform "Hello #{name}" end end
Just define typical initialization and the #perform method. Don’t forget to extend the interface!