Because the formatter and message classes need to be decoupled, we need a universal, abstract solution for making content available to any message class such that it can pull in the content that it needs. For example, while an email message requires a recipient, subject, and optional body, an IRC message only requires a recipient and simple message/body.
Rather than hard-code behavior per message type (which won't scale), Formatter::Base will have a method (i.e. #generate_content) that generates all the available content that a message object can then select required bits from.
Because the formatter and message classes need to be decoupled, we need a universal, abstract solution for making content available to any message class such that it can pull in the content that it needs. For example, while an email message requires a recipient, subject, and optional body, an IRC message only requires a recipient and simple message/body.
Rather than hard-code behavior per message type (which won't scale), Formatter::Base will have a method (i.e. #generate_content) that generates all the available content that a message object can then select required bits from.
I imagine the hash looks like: