Class: Doc::RootMerger

Inherits:
Merger show all
Defined in:
lib/doc/root_merger.rb

Instance Attribute Summary

Attributes inherited from Merger

#tasks

Attributes inherited from BaseTask

#config, #dir_name, #documentor, #title

Instance Method Summary collapse

Methods inherited from Merger

#build, #initialize, #symlink_children_to, #symlink_to

Methods inherited from BaseTask

#control_files_exist?, #eql?, #failed?, #hash, #in_progress_message, #initialize, #loaded_gem_version, #run?, state_methods, #succeeded?, #symlink_to

Constructor Details

This class inherits a constructor from Doc::Merger

Instance Method Details

#doc_dirObject



3
4
5
# File 'lib/doc/root_merger.rb', line 3

def doc_dir
  documentor.public_dir
end

#progress_messageObject



7
8
9
# File 'lib/doc/root_merger.rb', line 7

def progress_message
  'building docs'
end

#runObject



11
12
13
14
15
16
17
18
# File 'lib/doc/root_merger.rb', line 11

def run
  super
  if succeeded?
    public_doc_dir = doc_dir / documentor.docs_dir.basename
    public_doc_dir.mkpath
    symlink_children_to(public_doc_dir)
  end
end