vendredi 6 janvier 2017

How to pull commands from the model and add it to rakefile

I have a model test.rb. It have a method

....
....
def test
  ....
  ....
  when "a"
    "/home/user/Downloads/debian.iso"
  when "b"
    "/home/user/Downloads/hello.iso "
  when "c"
    "/home/user/Downloads/xyz.iso"
  end
  ....
end
....
....

I need to pull the above commands like this

"/home/user/Downloads/debian.iso; /home/user/Downloads/hello.iso; /home/user/Downloads/xyz.iso"

Aucun commentaire:

Enregistrer un commentaire