Sha256: b9e619674afc7227015326da81ee2175d5978cda06f417a981c6ba71d20cad73
Contents?: true
Size: 418 Bytes
Versions: 2
Compression:
Stored size: 418 Bytes
Contents
module Slayer class Command < Service singleton_skip_hook :call class << self def call(*args, &block) self.new.call(*args, &block) end private def inherited(klass) super(klass) klass.wrap_service_methods! klass.only_hook :call end end def call raise NotImplementedError, 'Commands must define method `#call`.' end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
slayer-0.4.0.beta4 | lib/slayer/command.rb |
slayer-0.4.0.beta3 | lib/slayer/command.rb |