Forum: Ruby Export values to a user specified format

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
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.

This topic is locked and can not be replied to.