Sha256: 7884b8fc20ef6bc2deafab81d08f0b20566368386c535a0fcead1aa1ef18645a

Contents?: true

Size: 882 Bytes

Versions: 30

Compression:

Stored size: 882 Bytes

Contents

require "jsduck/tag/boolean_tag"

module JsDuck::Tag
  class Private < BooleanTag
    def initialize
      @pattern = "private"
      @signature = {:long => "private", :short => "PRI"}
      @html_position = POS_PRIVATE
      @css = <<-EOCSS
        .signature .private {
          background-color: #FD6B1B; /* orange */
        }
        .private-box {
          background-color: #fee;
          text-align: center;
          color: #600;
          margin-bottom: 1em;
        }
      EOCSS
      super
    end

    # Add notice to private classes
    def to_html(context)
      return unless context[:tagname] == :class

      return [
        "<div class='rounded-box private-box'>",
        "<p><strong>NOTE:</strong> This is a private utility class for internal use ",
        "by the framework. Don't rely on its existence.</p>",
        "</div>",
      ]
    end
  end
end

Version data entries

30 entries across 30 versions & 3 rubygems

Version Path
solvas-jsduck-6.0.0.30539 lib/jsduck/tag/private.rb
solvas-jsduck-6.0.0.9571 lib/jsduck/tag/private.rb
solvas-jsduck-6.0.0.6154 lib/jsduck/tag/private.rb
solvas-jsduck-6.0.0.4021 lib/jsduck/tag/private.rb
solvas-jsduck-6.0.0.2554 lib/jsduck/tag/private.rb
solvas-jsduck-6.0.0.1891 lib/jsduck/tag/private.rb
solvas-jsduck-6.0.0.beta.1888 lib/jsduck/tag/private.rb
jsduck-troopjs-0.0.10 lib/jsduck/tag/private.rb
jsduck-troopjs-0.0.9 lib/jsduck/tag/private.rb
jsduck-troopjs-0.0.8 lib/jsduck/tag/private.rb
jsduck-troopjs-0.0.7 lib/jsduck/tag/private.rb
jsduck-troopjs-0.0.5 lib/jsduck/tag/private.rb
jsduck-troopjs-0.0.4 lib/jsduck/tag/private.rb
jsduck-troopjs-0.0.3 lib/jsduck/tag/private.rb
jsduck-troopjs-0.0.1 lib/jsduck/tag/private.rb
jsduck-6.0.0beta lib/jsduck/tag/private.rb
jsduck-5.3.4 lib/jsduck/tag/private.rb
jsduck-5.3.3 lib/jsduck/tag/private.rb
jsduck-5.3.2 lib/jsduck/tag/private.rb
jsduck-5.3.1 lib/jsduck/tag/private.rb