Loading lib/jsduck/app_data.rb +8 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ module JsDuck :examples => @examples.to_array, :search => SearchData.new.create(@relations.classes), :stats => @opts.stats ? Stats.new.create(@relations.classes) : [], :signatures => MetaTagRegistry.instance.signatures, :signatures => signatures, :localStorageDb => @opts.local_storage_db, :showPrintButton => @opts.seo, :touchExamplesUi => @opts.touch_examples_ui, Loading @@ -36,6 +36,13 @@ module JsDuck File.open(filename, 'w') {|f| f.write(js) } end def signatures sigs = MetaTagRegistry.instance.signatures # Inject private to meta tag signatures list sigs << {:key => 'private', :long => 'private', :short => 'PRI'} sigs end end end lib/jsduck/app_exporter.rb +2 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,8 @@ module JsDuck [:name, :tagname, :owner, :meta, :id].each do |key| m_copy[key] = m[key] end # Inject :private to meta. m_copy[:meta][:private] = true if m[:private] m_copy end Loading lib/jsduck/class.rb +1 −1 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ module JsDuck # # See members_hash for details. def members(type, context=:members) ms = members_hash(type, context).values.find_all {|m| !m[:private] } ms = members_hash(type, context).values #.find_all {|m| !m[:private] } ms.sort! {|a,b| a[:name] <=> b[:name] } type == :method ? constructor_first(ms) : ms end Loading lib/jsduck/class_formatter.rb +3 −6 Original line number Diff line number Diff line Loading @@ -5,8 +5,7 @@ require 'jsduck/meta_tag_registry' module JsDuck # Converts :doc properties of class from markdown to HTML, resolves # @links, and converts type definitions to HTML. Also removes # private members. # @links, and converts type definitions to HTML. class ClassFormatter # Set to false to disable HTML-formatting of type definitions. attr_accessor :include_types Loading @@ -28,10 +27,8 @@ module JsDuck cls[:doc] = @formatter.format(cls[:doc]) if cls[:doc] [:members, :statics].each do |group| cls[group].each_pair do |type, members| # format all public members, but keep the private members # too - some of them might override public members and we # don't want to lose this information. cls[group][type] = members.map {|m| m[:private] ? m : format_member(m) } # format all members cls[group][type] = members.map {|m| format_member(m) } end end cls[:html_meta] = format_meta_data(cls[:meta]) Loading lib/jsduck/renderer.rb +2 −0 Original line number Diff line number Diff line Loading @@ -217,6 +217,8 @@ module JsDuck MetaTagRegistry.instance.signatures.each do |s| after += "<strong class='#{s[:key]} signature'>#{s[:long]}</strong>" if m[:meta][s[:key]] end # Special case for :private which isn't inside :meta. after += "<strong class='private signature'>private</strong>" if m[:private] uri = "#!/api/#{m[:owner]}-#{m[:id]}" Loading Loading
lib/jsduck/app_data.rb +8 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ module JsDuck :examples => @examples.to_array, :search => SearchData.new.create(@relations.classes), :stats => @opts.stats ? Stats.new.create(@relations.classes) : [], :signatures => MetaTagRegistry.instance.signatures, :signatures => signatures, :localStorageDb => @opts.local_storage_db, :showPrintButton => @opts.seo, :touchExamplesUi => @opts.touch_examples_ui, Loading @@ -36,6 +36,13 @@ module JsDuck File.open(filename, 'w') {|f| f.write(js) } end def signatures sigs = MetaTagRegistry.instance.signatures # Inject private to meta tag signatures list sigs << {:key => 'private', :long => 'private', :short => 'PRI'} sigs end end end
lib/jsduck/app_exporter.rb +2 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,8 @@ module JsDuck [:name, :tagname, :owner, :meta, :id].each do |key| m_copy[key] = m[key] end # Inject :private to meta. m_copy[:meta][:private] = true if m[:private] m_copy end Loading
lib/jsduck/class.rb +1 −1 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ module JsDuck # # See members_hash for details. def members(type, context=:members) ms = members_hash(type, context).values.find_all {|m| !m[:private] } ms = members_hash(type, context).values #.find_all {|m| !m[:private] } ms.sort! {|a,b| a[:name] <=> b[:name] } type == :method ? constructor_first(ms) : ms end Loading
lib/jsduck/class_formatter.rb +3 −6 Original line number Diff line number Diff line Loading @@ -5,8 +5,7 @@ require 'jsduck/meta_tag_registry' module JsDuck # Converts :doc properties of class from markdown to HTML, resolves # @links, and converts type definitions to HTML. Also removes # private members. # @links, and converts type definitions to HTML. class ClassFormatter # Set to false to disable HTML-formatting of type definitions. attr_accessor :include_types Loading @@ -28,10 +27,8 @@ module JsDuck cls[:doc] = @formatter.format(cls[:doc]) if cls[:doc] [:members, :statics].each do |group| cls[group].each_pair do |type, members| # format all public members, but keep the private members # too - some of them might override public members and we # don't want to lose this information. cls[group][type] = members.map {|m| m[:private] ? m : format_member(m) } # format all members cls[group][type] = members.map {|m| format_member(m) } end end cls[:html_meta] = format_meta_data(cls[:meta]) Loading
lib/jsduck/renderer.rb +2 −0 Original line number Diff line number Diff line Loading @@ -217,6 +217,8 @@ module JsDuck MetaTagRegistry.instance.signatures.each do |s| after += "<strong class='#{s[:key]} signature'>#{s[:long]}</strong>" if m[:meta][s[:key]] end # Special case for :private which isn't inside :meta. after += "<strong class='private signature'>private</strong>" if m[:private] uri = "#!/api/#{m[:owner]}-#{m[:id]}" Loading