Sha256: 63c775782930de8259cae77c0b3f618376ada4b40ed3c8878a1814739f534c43
Contents?: true
Size: 468 Bytes
Versions: 9
Compression:
Stored size: 468 Bytes
Contents
module MagicLamp module Callbacks attr_accessor :configuration def initialize(configuration) self.configuration = configuration end def execute_before_each_callback execute_callback(:before) end def execute_after_each_callback execute_callback(:after) end private def execute_callback(type) callback = configuration.send("#{type}_each_proc") callback.call unless callback.nil? end end end
Version data entries
9 entries across 9 versions & 1 rubygems