Sha256: 87841730fca519bfa21d7509acfdabd84444a755c0afdb57338afb9ca95b940e

Contents?: true

Size: 684 Bytes

Versions: 52

Compression:

Stored size: 684 Bytes

Contents

require "jsduck/meta_tag"

module JsDuck::Tag
  # Implementation of @preventable tag
  class Preventable < JsDuck::MetaTag
    def initialize
      @name = "preventable"
      @key = :preventable
      @signature = {:long => "preventable", :short => "PREV"}
    end

    # @preventable is optionally followed by some method name, but we
    # don't document it.
    def to_value(contents)
      true
    end

    def to_html(v)
      <<-EOHTML
        <div class='signature-box preventable'>
        <p>This action following this event is <b>preventable</b>.
        When any of the listeners returns false, the action is cancelled.</p>
        </div>
      EOHTML
    end
  end
end

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
jsduck-3.8.2 lib/jsduck/tag/preventable.rb
jsduck-3.8.1 lib/jsduck/tag/preventable.rb
jsduck-3.8.0 lib/jsduck/tag/preventable.rb
jsduck-3.7.0 lib/jsduck/tag/preventable.rb
jsduck-3.6.1 lib/jsduck/tag/preventable.rb
jsduck-3.6.0 lib/jsduck/tag/preventable.rb
jsduck-3.5.0 lib/jsduck/tag/preventable.rb
jsduck-3.4.1 lib/jsduck/tag/preventable.rb
jsduck-3.4.0 lib/jsduck/tag/preventable.rb
jsduck-3.3.1 lib/jsduck/tag/preventable.rb
jsduck-3.3.0 lib/jsduck/tag/preventable.rb
jsduck-3.2.1 lib/jsduck/tag/preventable.rb