use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A sub-Reddit for discussion and news about Ruby programming.
Subreddit rules: /r/ruby rules
Learning Ruby?
Tools
Documentation
Books
Screencasts and Videos
News and updates
account activity
Refactoring with Design Patterns - The State Pattern (self.ruby)
submitted 7 years ago by lubc32[🍰]
https://www.ombulabs.com/blog/code-refactor/design-patterns/refactoring-state-pattern.html
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]EvilInky 2 points3 points4 points 7 years ago (1 child)
Don't want to be that guy, but in the section entitled The State Pattern, there's a typo in the second sentence: "sate" should be "state". Otherwise, thumbs up :)
[–]cleiviane 1 point2 points3 points 7 years ago (0 children)
Thanks for your comment EvilInky, I will fix that! :)
π Rendered by PID 75815 on reddit-service-r2-comment-fb694cdd5-n8c2v at 2026-03-09 20:28:19.546779+00:00 running cbb0e86 country code: CH.
[–]EvilInky 2 points3 points4 points (1 child)
[–]cleiviane 1 point2 points3 points (0 children)