Sha256: 08721f6388da8ec8a580e1550aabd1ab067eed87c7d6497dabe95a45b5cec580
Contents?: true
Size: 309 Bytes
Versions: 35
Compression:
Stored size: 309 Bytes
Contents
class Terraspace::App class Hooks class_attribute :hooks self.hooks = {} def on_boot(&block) self.class.hooks[:on_boot] = block end class << self def run_hook(name) name = name.to_sym hook = hooks[name] hook.call if hook end end end end
Version data entries
35 entries across 35 versions & 1 rubygems