Download function as a ruby file
Closed this issue · 0 comments
emad-elsaid commented
Problem
We need a way to download the function code and use it locally.
Proposed solution
- introduce a link to download the function in the function/show page
- the link will serve the same page with different format (.rb)
- add a view to the views/functions/show.rb.erb (will that even work?)
- this should render the ruby function and the usage as a comment on top of it
Consequences
- Now one can have a functions file like
.rubyfunctions
in his project - define a list of
username/functions/function_name
- have a small command that download all of this functions from
rubyfunctions.com
to a directory likefunctions/username/functionname.rb