J
Joe Van Dyk
I'm writing some code that generates an image file based off either a
binary file or shared memory.
I figure that I need three functions:
generate_image_from_file # public
generate_image_from_shmem #public
generate_image # private?
The user would call either generate_image_from_file or
generate_image_from_shmem. Once the data has been loaded, both
functions would call generate_image to write the image to a file
somewhere.
Would this be best written as a class inside a module? Or a set of
functions inside a module? I'm not really storing any data, and
there's no point in keeping the object around after the image is
generated.
Thanks,
Joe
binary file or shared memory.
I figure that I need three functions:
generate_image_from_file # public
generate_image_from_shmem #public
generate_image # private?
The user would call either generate_image_from_file or
generate_image_from_shmem. Once the data has been loaded, both
functions would call generate_image to write the image to a file
somewhere.
Would this be best written as a class inside a module? Or a set of
functions inside a module? I'm not really storing any data, and
there's no point in keeping the object around after the image is
generated.
Thanks,
Joe