From 96f14b85caa5f04017bc172d81ca847632f5f438 Mon Sep 17 00:00:00 2001 From: Rene Saarsoo Date: Mon, 14 Jan 2013 19:35:22 +0200 Subject: [PATCH] Implament class name detection in Tag::Class. --- lib/jsduck/doc/ast.rb | 1 - lib/jsduck/tag/class.rb | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/jsduck/doc/ast.rb b/lib/jsduck/doc/ast.rb index 3bda32a6..7c8340d3 100644 --- a/lib/jsduck/doc/ast.rb +++ b/lib/jsduck/doc/ast.rb @@ -42,7 +42,6 @@ module JsDuck def create_class(docs, doc_map) return add_shared({ :tagname => :class, - :name => detect_name(:class, doc_map), :doc => detect_doc(docs), }, doc_map) end diff --git a/lib/jsduck/tag/class.rb b/lib/jsduck/tag/class.rb index 0c43f0f4..e064b806 100644 --- a/lib/jsduck/tag/class.rb +++ b/lib/jsduck/tag/class.rb @@ -4,6 +4,7 @@ module JsDuck::Tag class Class < Tag def initialize @pattern = "class" + @key = :class end # @class name @@ -13,5 +14,9 @@ module JsDuck::Tag :name => p.hw.ident_chain, } end + + def process_doc(tags) + {:name => tags[0][:name]} + end end end -- GitLab