Module: Kernel

Defined in:
lib/dorsale/file_loader.rb

Instance Method Summary collapse

Instance Method Details

#dorsale_fileObject



2
3
4
5
6
7
8
9
# File 'lib/dorsale/file_loader.rb', line 2

def dorsale_file
  app_file      = caller.first.split(":").first
  app_root      = ::Rails.application.root.to_s
  relative_file = app_file.gsub(app_root, "")
  dorsale_root  = ::Dorsale::Engine.root.to_s

  ::File.join(dorsale_root, relative_file)
end