emad-elsaid/rubyfunctions

Download function as a ruby file

Closed this issue · 0 comments

Problem

We need a way to download the function code and use it locally.

Proposed solution

  1. introduce a link to download the function in the function/show page
  2. the link will serve the same page with different format (.rb)
  3. add a view to the views/functions/show.rb.erb (will that even work?)
  4. this should render the ruby function and the usage as a comment on top of it

Consequences

  1. Now one can have a functions file like .rubyfunctions in his project
  2. define a list of username/functions/function_name
  3. have a small command that download all of this functions from rubyfunctions.com to a directory like functions/username/functionname.rb