Sha256: c9eddf769957c964b3cb9e18e20a5bbacda6fa14c1ce596dec6c68a81c56ee9e
Contents?: true
Size: 438 Bytes
Versions: 33
Compression:
Stored size: 438 Bytes
Contents
module RakeFactory module Actions def self.included(base) base.extend(ClassMethods) end def invoke_actions(args) self.class.actions.each do |action| self.instance_exec(*[self, args].slice(0, action.arity), &action) end end module ClassMethods def actions @actions ||= [] end def action(&action_block) actions << action_block end end end end
Version data entries
33 entries across 33 versions & 1 rubygems