CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Wed, 27 Aug 2025 04:09:19 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20090218092714
location: https://web.archive.org/web/20090218092714/https://github.com/jnicklas/micro_hooks/tree
server-timing: captures_list;dur=0.784427, exclusion.robots;dur=0.025088, exclusion.robots.policy;dur=0.010312, esindex;dur=0.015376, cdx.remote;dur=131.457161, LoadShardBlock;dur=166.491413, PetaboxLoader3.datanode;dur=58.585003, PetaboxLoader3.resolve;dur=28.646123
x-app-server: wwwb-app224
x-ts: 302
x-tr: 422
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-SERVER=wwwb-app224; path=/
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 301
server: nginx
date: Wed, 27 Aug 2025 04:09:20 GMT
content-type: text/html; charset=utf-8
content-length: 116
x-archive-orig-server: nginx/0.6.26
x-archive-orig-date: Wed, 18 Feb 2009 09:27:14 GMT
x-archive-orig-connection: close
x-archive-orig-status: 301 Moved Permanently
location: https://web.archive.org/web/20090218092714/https://github.com/jnicklas/micro_hooks/tree/master
x-archive-orig-x-runtime: 18ms
x-archive-orig-cache-control: no-cache
x-archive-orig-content-length: 116
cache-control: max-age=1800
memento-datetime: Wed, 18 Feb 2009 09:27:14 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Wed, 18 Feb 2009 09:27:14 GMT", ; rel="memento"; datetime="Wed, 18 Feb 2009 09:27:14 GMT", ; rel="last memento"; datetime="Wed, 18 Feb 2009 09:27:14 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 52_8_20090218071022_crawl103-c/52_8_20090218092708_crawl101.arc.gz
server-timing: captures_list;dur=0.668466, exclusion.robots;dur=0.023309, exclusion.robots.policy;dur=0.010824, esindex;dur=0.015033, cdx.remote;dur=164.613070, LoadShardBlock;dur=364.438584, PetaboxLoader3.datanode;dur=158.715855, PetaboxLoader3.resolve;dur=269.229319, load_resource;dur=310.999414
x-app-server: wwwb-app224
x-ts: 301
x-tr: 866
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Wed, 27 Aug 2025 04:09:21 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.6.26
x-archive-orig-date: Wed, 18 Feb 2009 09:27:14 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-x-runtime: 290ms
x-archive-orig-etag: "3c8448fbf2f902ff7afd2bb354f41dca"
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-orig-content-length: 18028
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Wed, 18 Feb 2009 09:27:14 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Mon, 16 Feb 2009 18:05:33 GMT", ; rel="prev memento"; datetime="Mon, 16 Feb 2009 18:05:33 GMT", ; rel="memento"; datetime="Wed, 18 Feb 2009 09:27:14 GMT", ; rel="last memento"; datetime="Wed, 18 Feb 2009 09:27:14 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 52_8_20090218071022_crawl103-c/52_8_20090218092708_crawl101.arc.gz
server-timing: captures_list;dur=0.770081, exclusion.robots;dur=0.023363, exclusion.robots.policy;dur=0.010306, esindex;dur=0.014346, cdx.remote;dur=27.734028, LoadShardBlock;dur=164.354172, PetaboxLoader3.datanode;dur=87.772850, PetaboxLoader3.resolve;dur=261.289446, load_resource;dur=209.803488
x-app-server: wwwb-app224
x-ts: 200
x-tr: 456
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
jnicklas's micro_hooks at master - GitHub
This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (

This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (

Run the following if you haven't already:
gem sources -a https://gems.github.com
Install the gem(s):
sudo gem install jnicklas-micro_hooks
Description: | A tiny, tiny hooks framework. Really, very tiny. |
Clone URL: |
git://github.com/jnicklas/micro_hooks.git
Give this clone URL to anyone.
git clone git://github.com/jnicklas/micro_hooks.git
|
name | age | message | |
---|---|---|---|
![]() |
.gitignore | Loading commit data... ![]() |
|
![]() |
LICENSE | ||
![]() |
README.md | ||
![]() |
Rakefile | ||
![]() |
lib/ | ||
![]() |
micro_hooks.gemspec | ||
![]() |
spec/ |
MicroHooks
Hooks are a mechanism for allowing other code to hook into your library in a very modular way. It's basically a really, really simple way to implement callbacks. It works like this:
Create a class, include MicroHooks and add some hooks in your methods.
require 'rubygems'
require 'micro_hooks'
class SomeClass
include MicroHooks
def foo
hook :before_foo
puts "Monkey"
hook :after_foo
end
def baz
puts "-> Ape"
end
def quox
puts "-> Bear"
end
end
You can then add some hooks
SomeClass.before :foo, :baz
SomeClass.after :foo, :quox
s = SomeClass.new
s.foo
The result here would be:
-> Ape
Monkey
-> Bear
You can also pass arguments to hooks.
def foo(bar)
hook :quox, bar
end
def baz(bar)
end
If baz is added as a hook on quox, then baz will be called with bar as an argument. (are you following?)
This feature is coming soon. Sit tight!