Sha256: 630927e722992929f44b2c7b61e6f4affd3c370cfe07773a4263d02ded80e92d

Contents?: true

Size: 1.07 KB

Versions: 13

Compression:

Stored size: 1.07 KB

Contents

require 'jsduck/class'

module JsDuck

  # Exporter for all the class docs.
  class FullExporter
    def initialize(relations, opts)
      @relations = relations
      # opts parameter is here just for compatibility with other exporters
    end

    # Returns all data in Class object as hash.
    def export(cls)
      h = cls.to_hash
      h[:members] = {}
      Class.default_members_hash.each_key do |key|
        h[:members][key] = cls.members(key)
        h[:statics][key] = cls.members(key, :statics)
      end
      h[:component] = cls.inherits_from?("Ext.Component")
      h[:superclasses] = cls.superclasses.collect {|c| c.full_name }
      h[:subclasses] = @relations.subclasses(cls).collect {|c| c.full_name }
      h[:mixedInto] = @relations.mixed_into(cls).collect {|c| c.full_name }

      h[:mixins] = cls.deps(:mixins).collect {|c| c.full_name }
      h[:parentMixins] = cls.parent_deps(:mixins).collect {|c| c.full_name }
      h[:requires] = cls.deps(:requires).collect {|c| c.full_name }
      h[:uses] = cls.deps(:uses).collect {|c| c.full_name }

      h
    end

  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
jsduck-4.0.1 lib/jsduck/full_exporter.rb
jsduck-4.0.0 lib/jsduck/full_exporter.rb
jsduck-3.11.2 lib/jsduck/full_exporter.rb
jsduck-4.0.beta2 lib/jsduck/full_exporter.rb
jsduck-3.11.1 lib/jsduck/full_exporter.rb
jsduck-4.0.beta lib/jsduck/full_exporter.rb
jsduck-3.11.0 lib/jsduck/full_exporter.rb
jsduck-3.10.5 lib/jsduck/full_exporter.rb
jsduck-3.10.4 lib/jsduck/full_exporter.rb
jsduck-3.10.3 lib/jsduck/full_exporter.rb
jsduck-3.10.2 lib/jsduck/full_exporter.rb
jsduck-3.10.1 lib/jsduck/full_exporter.rb
jsduck-3.10.0 lib/jsduck/full_exporter.rb