lib/yard/code_objects/base.rb in yard-0.7.3 vs lib/yard/code_objects/base.rb in yard-0.7.4

- old
+ new

@@ -282,10 +282,13 @@ alias == equal? alias eql? equal? # @return [Integer] the object's hash value (for equality checking) def hash; path.hash end + + # @return [nil] this object does not turn into an array + def to_ary; nil end # Accesses a custom attribute on the object # @param [#to_s] key the name of the custom attribute # @return [Object, nil] the custom attribute or nil if not found. # @see #[]= @@ -334,10 +337,9 @@ # @param [#source, String] statement # the +Parser::Statement+ holding the source code or the raw source # as a +String+ for the definition of the code object only (not the block) def source=(statement) if statement.respond_to?(:source) - self.line = statement.line self.signature = statement.first_line @source = format_source(statement.source.strip) else @source = format_source(statement.to_s) end