Enable Users to Add Memes to Your Gem

As it stands now, this skill can scale up to arbitrarily large numbers of meme templates with little fuss. However, another layer of complexity is available to you—users of this gem may want to add support for more Imgflip templates than you want to deal with at the moment. This scenario prompts the final refactor: rework the TEMPLATES idiom to allow for programmatic insertion and activation of new meme templates without forcing consumers to open the ImgflipMemes class.

Users of this macro-builder gem will likely want to add new memes, but they won’t want to hack into the actual gem to do so. Your goal in this phase is to provide operators of your Imgflip Lita skill with a one-line add a new meme to the ...

Get Build Chatbot Interactions now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.