Class: Engine

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

Class Method Summary collapse

Class Method Details



28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/doculab/engine.rb', line 28

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



24
25
26
# File 'lib/doculab/engine.rb', line 24

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