Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Home

Kaoru Kobo edited this page · 6 revisions
Clone this wiki locally

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.
Something went wrong with that request. Please try again.