Simplify App#run by using Null Object pattern.
Welcome, Guides, Videos, Examples and Categories now all have a static #create method to be used instead of #new for instantiation. The #create returns either the corresponding object instance or NullObject which behaves as if it were the needed object, but effectively does nothing. Categories.create is a bit different - it first uses one of two strategies for creating categories: FileCategories when filename present or AutoCategories when not, then feeding the resulting categories list to actual Categories object.
Loading
Please register or sign in to comment