module Madness::ServerHelper
All the methods that we may need inside of any server route. The module can also be included manually anywhere else.
Public Instance Methods
config()
click to toggle source
# File lib/madness/server_helper.rb, line 6 def config @config ||= Settings.instance end
docroot()
click to toggle source
# File lib/madness/server_helper.rb, line 10 def docroot @docroot ||= File.expand_path(config.path, Dir.pwd) end
log(obj)
click to toggle source
# File lib/madness/server_helper.rb, line 14 def log(obj) #:nocov: open('madness.log', 'a') { |f| f.puts obj.inspect } #:nocov: end