lib/yard/handlers/base.rb in yard-0.6.4 vs lib/yard/handlers/base.rb in yard-0.6.5

- old
+ new

@@ -2,11 +2,11 @@ module Handlers # Raised during processing phase when a handler needs to perform # an operation on an object's namespace but the namespace could # not be resolved. class NamespaceMissingError < Parser::UndocumentableError - # The object the error occured on + # The object the error occurred on # @return [CodeObjects::Base] a code object attr_accessor :object def initialize(object) @object = object end end @@ -392,10 +392,11 @@ object.add_file(parser.file, statement.line, statement.comments) # Add docstring if there is one. object.docstring = statement.comments if statement.comments + object.docstring.hash_flag = statement.comments_hash_flag object.docstring.line_range = statement.comments_range # Add group information if statement.group unless object.namespace.is_a?(Proxy) @@ -444,9 +445,10 @@ # @raise [NamespaceMissingError] if the object is not resolved within # +max_retries+ attempts, this exception is raised and the handler # finishes processing. def ensure_loaded!(object, max_retries = 1) return if object.root? + return object unless object.is_a?(Proxy) unless parser.load_order_errors if object.is_a?(Proxy) raise NamespaceMissingError, object else nil \ No newline at end of file