Class: Engine

Inherits:
Rails::Engine
  • Object
show all
Defined in:
lib/doculab/engine.rb

Class Method Summary collapse

Class Method Details



24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/doculab/engine.rb', line 24

def self.print_warning(message_key)
  message = case message_key
  when :table_of_contents
    "There is no Table of Contents defined at #{table_of_contents_path}"
  else
    nil
  end

  if message.present?
    message = "=> Doculab WARNING: #{message}"
    puts message
    Rails.logger.info message
  end
end

.table_of_contents_pathObject



20
21
22
# File 'lib/doculab/engine.rb', line 20

def self.table_of_contents_path
  Rails.root.join("doculab", "meta", "table_of_contents.rb").to_s
end