lib/ronin/object_context.rb in ronin-0.1.0 vs lib/ronin/object_context.rb in ronin-0.1.1

- old
+ new

@@ -194,13 +194,11 @@ # # Cache all objects loaded from the specified _path_. # def ObjectContext.cache_objects(path) - ObjectContext.load_objects(path).each do |obj| - obj.cache - end + ObjectContext.load_objects(path).each { |obj| obj.cache } end # # Cache all objects loaded from the paths within the specified # _directory_. @@ -208,13 +206,11 @@ def ObjectContext.cache_objects_in(directory) directory = File.expand_path(directory) paths = Dir[File.join(directory,'**','*.rb')] paths.each do |path| - ObjectContext.load_objects(path).each do |obj| - obj.cache - end + ObjectContext.load_objects(path).each { |obj| obj.cache } end return nil end @@ -232,12 +228,10 @@ paths -= objects.map { |obj| obj.object_path } objects.each { |obj| obj.mirror } end - paths.each do |path| - ObjectContext.cache_objects(path) - end + paths.each { |path| ObjectContext.cache_objects(path) } return nil end #