Sha256: ac9b0010a1b170f67891a703f734d02740c8fc02b27623ac1b5de0a7820cd9c0
Contents?: true
Size: 599 Bytes
Versions: 9
Compression:
Stored size: 599 Bytes
Contents
# Copyright (c) 2011, SoundCloud Ltd., Rany Keddo, Tobias Bielohlawek, Tobias # Schmidt module Lhm class Error < StandardError end module Command def run(&block) validate if(block_given?) before block.call(self) after else execute end rescue revert raise end private def validate end def revert end def execute raise NotImplementedError.new(self.class.name) end def before end def after end def error(msg) raise Error.new(msg) end end end
Version data entries
9 entries across 9 versions & 2 rubygems