Sha256: c71bdf14c650649cf7ab9f4692b577fa2fe6508953d8879d49f56604bf509fd2
Contents?: true
Size: 500 Bytes
Versions: 23
Compression:
Stored size: 500 Bytes
Contents
module Lookbook class HookStore CONFIG_FILE = "config/hooks.yml" attr_reader :store delegate :to_h, to: :store def initialize(config = nil) @store = {} end def add_hook(event_name, callback) for_event(event_name) << callback end def for_event(event_name) store[event_name.to_sym] ||= [] end def self.init_from_config new(default_config) end def self.default_config ConfigLoader.call(CONFIG_FILE) end end end
Version data entries
23 entries across 23 versions & 1 rubygems