Yeah, that's also work

On Saturday, November 2, 2013, Emmanuel Pinault wrote:

> In src/scripts/devops.coffee:
>
> > +
> > +module.exports = (robot) ->
> > +  robot.respond /devops me/i, (msg) ->
> > +    randevopsMe msg, (url, title) ->
> > +      msg.send title
> > +      msg.send url
> > +
> > +randevopsMe = (msg, cb) ->
> > +  msg.http("http://devopsreactions.tumblr.com/random")
> > +    .get() (err, res, body) ->
> > +      console.log res.headers.location
> > +      devopsMe msg, res.headers.location, (location, title) ->
> > +        cb location , title
> > +
> > +devopsMe = (msg, location, cb) ->
> > +  msg.http(location)
>
> can't I pass the robot to my function?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/github/hubot-scripts/pull/1208/files#r7386817>
> .
>


-- 
Josh