lib/metro/scenes.rb
def all_scenes_for(scenes)
      Array(scenes).map do |scene_class_name|
        scene = scene_class_name.constantize
        [ scene ] + all_scenes_for(scene.scenes)
      end.flatten.compact
    end
def all_scenes_for(scenes)
      Array(scenes).map do |scene_class_name|
        scene = scene_class_name.constantize
        [ scene ] + all_scenes_for(scene.scenes)
      end.flatten.compact
    end
Returns all subclassed scenes of the scene or scenes provided. This method is
 meant to be called recursively to generate the entire list of all the scenes.

 @param [Scene,Array<Scene>] scenes a scene or scene subclass or an array of
   scene subclasses.