Method: Padrino.caller_files
- Defined in:
- padrino-core/lib/padrino-core/caller.rb
.caller_files ⇒ Array<String>
Like Kernel#caller but excluding certain magic entries and without line / method information; the resulting array contains filenames only.
47 48 49 50 51 52 |
# File 'padrino-core/lib/padrino-core/caller.rb', line 47 def self.caller_files caller(1). map { |line| line.split(/:(?=\d|in )/)[0,2] }. reject { |file,_line| PADRINO_IGNORE_CALLERS.any? { |pattern| file =~ pattern } }. map { |file,_line| file } end |