Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.
Kaoru Kobo edited this page Dec 1, 2010 · 6 revisions

rhook

require "rhook"

# Trace TCPSocket output data.
TCPSocket._rhook.hack(:write) { |inv|
  STDERR.print("> ", inv.args[0].inspect, "\n")
  inv.call
}

Features

  • You can do AOP(Aspect-Oriented Programming) with simple code.
  • You can provide hook-points in your app/library, and allows users to adding/customize the behavior from outside, without changing the code.
  • The 'hack' feature allows you to customize any existing methods in Ruby core/libraries/products.

User's Guide

(Now under construction)

Support

  • At first, try to search Issue Tracker.
  • Any questions, suggestions, and patches are welcome.
    • Please post them to the Issue Tracker.
    • I cannot understand English so well, so it's helpful you post with RSpec code that it satisfies your intention.
    • ( For Japanese user ) Also I can accept any issues in Japanese. Post them to the Google Group.
Clone this wiki locally