# LibTmux::Session#hooks

- **Module:** LibTmux
- **Package:** libtmux
- **Language:** Ruby
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ruby/blob/dcc9f8b5a6970144a9e7d80cd5f381d8f6198372/gems/libtmux/lib/libtmux/operations.rb#L243
- **Public owner:** LibTmux::Entity#hooks
- **Page:** https://libtmux.org/en/ruby/v0.1.0.alpha.2/reference/libtmux-session-hooks/

```
def hooks: () -> ::LibTmux::Hooks
```

Behavior: Options and hooks.

Behavior contract: Options and hooks.

## In other ports

### Read a session's hooks

- Python: [`libtmux.Session.show_hooks`](/en/py/latest/reference/libtmux-session-show_hooks/) (method)
- Lua: [`libtmux.Session:list_hooks`](/en/lua/latest/reference/libtmux-session-list_hooks/) (method)
- TypeScript: [`session.Session.showHooks`](/en/ts/latest/reference/session-session-showhooks/) (method)
- Rust: [`session.Session.hooks`](/en/rs/latest/reference/session-session-hooks/) (method)
- Go: [`tmux.Session.Hooks`](/en/go/latest/reference/tmux-session-hooks/) (method)
- Java: [`io.github.libtmux.Session.Session.hooks`](/en/java/latest/reference/io-github-libtmux-session-session-hooks/) (method)
- C#: [`LibTmux.Session.Hooks`](/en/csharp/latest/reference/libtmux-session-hooks/) (property)
- C++: [`libtmux::Session::hooks`](/en/cxx/latest/reference/libtmux-session-hooks/) (method)
- Swift: [`Server.hooks(_:)`](/en/swift/latest/reference/server-hooks(_-)/) (method)
