Abstracted the logic for doing some operation for all castles into Homesick.inside_each_castle() which takes a block argument. Homesick.list() is also reimplemented to use this new method, because that's where the logic was stolen from. The actual updating is also moved to the private method update_castle() to make pull() shorter.
4.5 KiB
4.5 KiB