Rendering Dynamic Content in Ruby
In this guide you will learn how to create a deck of cards using a custom seed and random algorithm.
Guide Tasks
- Read Tutorial
- Complete the Exercise
Summary
Build a class that can render content in a string.
Exercise Description
"Define a class that can render content into a single string and a rendered string."
Example Data
'@base_content' -> "1:1:baseball" => "Some baseball content", -> "2:1:football" => "Some football content", -> "3:2:baseball" => "Some more baseball content" 'dc = DynamicContent.new(@base_content)'
Real World Usage
This exercise will help you learn how render content in strings. Strings are something you will be using on a daily basis in projects.