Sha256: 1f64ced543851ee9c3f330d7b7a69fcfba5a67aba5ecdc348478f9823ce2f7a4
Contents?: true
Size: 704 Bytes
Versions: 20
Compression:
Stored size: 704 Bytes
Contents
# Hook. Created by plugins, it's block is called if emitted event matches pattern # @!attribute [r] pattern # @return [Hash<Symbol>] Hook's pattern # @!attribute [r] block # @return [Proc] Block # @!attribute [r] extra # @return [Hash] Extra data. Usually used by hook modifiers # @!attribute [r] chain # @return [Array<Proc>] Proc array. These are executed before calling main block. # If any returns false value, main block is not called class ProtonBot::Hook attr_reader :pattern, :block, :extra, :chain # @param pattern [Hash<Symbol>] # @param block [Proc] def initialize(pattern, &block) @pattern = pattern @block = block @extra = {} @chain = [] end end
Version data entries
20 entries across 20 versions & 1 rubygems