lib/yard/server.rb in yard-0.9.0 vs lib/yard/server.rb in yard-0.9.1
- old
+ new
@@ -3,9 +3,10 @@
# Registers a static path to be used in static asset lookup.
# @param [String] path the pathname to register
# @return [void]
# @since 0.6.2
def self.register_static_path(path)
- Commands::StaticFileCommand::STATIC_PATHS.push(path)
+ static_paths = Commands::StaticFileCommand::STATIC_PATHS
+ static_paths.push(path) unless static_paths.include?(path)
end
end
end
\ No newline at end of file