Forum: Ruby Export values to a user specified format

91effca91ad98a70c69ee1b841b4d537?d=identicon&s=25 Raghav Kanwal (raghavkanwal)
on 2014-05-10 20:17
Hello, I have this task assigned to me currently :

>Part 1: Create a console based application that accepts patient
>details(Name, Age and Sex) and then exports those details into one of 2
>formats, depending on the user's choice - "plain text" or "pdf"

>Part 2: Extend the above program to allow for a 3rd format called
>"foobar" that can be plugged in. The details of this format will not
>however be revealed. Therefore you'll need to provide a way for your
>customer to add the new format - without having to touch your existing
>code.  The application, when re-started, should then allow the user to
>choose that format as the 3rd option.

I'm fine with the first part as it involves simple File operations,and I
can use a rubyGem like Prawn to help out, but I'm having trouble with
the 2nd portion. Could someone please explain/help out on how this would
be done?

Any help with this would be greatly appreciated.

Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.