Class: JsDuck::TagLoader

Inherits:
Object
  • Object
show all
Defined in:
lib/jsduck/tag_loader.rb

Overview

Loads Tag classes from the builtin tags/ dir and optionally also from additional paths.

Instance Method Summary collapse

Constructor Details

#initialize(extra_paths = []) ⇒ TagLoader

Returns a new instance of TagLoader.



8
9
10
11
# File 'lib/jsduck/tag_loader.rb', line 8

def initialize(extra_paths=[])
  @paths = [File.dirname(__FILE__) + "/tag"]
  @paths += extra_paths
end

Instance Method Details

#load_allObject

Loads Tag classes from all supplied paths.

Returns the tag classes that got loaded, sorted alphabetically by class name.



17
18
19
20
# File 'lib/jsduck/tag_loader.rb', line 17

def load_all
  @paths.each {|path| load(path) }
  tag_classes
end