Skip to content

Instantly share code, notes, and snippets.

@EugeneN
Created March 23, 2013 15:45
Show Gist options
  • Save EugeneN/5228153 to your computer and use it in GitHub Desktop.
Save EugeneN/5228153 to your computer and use it in GitHub Desktop.
gistfile1.coffee
```
var protocol = require('protocol/core').protocol
var Adapter = protocol
'*guard*': (ctx) -> ?
match: [ protocol, ctx]
get_deps: [protocol, ctx]
get_sources: [protocol, ctx]
...
Adapter(
'plain_file'
match: (ctx) ->
get_deps: (ctx) ->
get_sources: (ctx) ->
)
...
myadapter = Adapter.dispatch ctx
myadapter.get_deps ctx
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment