Skip to content

Removing hooks? #31

@cmtonkinson

Description

@cmtonkinson

I don't see any (documented or not) method to remove a hook. Is this possible, even if not fully supported? How would I do this?

If I wanted to remove all Hooks by name, it looks like I might be able to run self._hooks[:hook_name] = nil but it's not clear that

  1. This is "safe"
  2. This wouldn't result in memory leak for a long-running process.

I know this is more a pub/sub workflow than hooking, strictly speaking, but it would be awfully helpful (to my current challenge). Lacking a proper solution or viable hack, I'll have to rip out this gem and replace it with a pub/sub alternative, which I don't look forward to.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions