Top Level Namespace

Defined Under Namespace

Modules: Spectre Classes: Array, Hash, Object, OpenStruct, String

Instance Method Summary collapse

Instance Method Details

#get_call_location(call_stack) ⇒ Object



18
19
20
21
22
23
24
25
26
# File 'lib/spectre.rb', line 18

def get_call_location call_stack
  loc = (call_stack || caller_locations)
    .find { |x| x.label.include? 'Spectre::Engine#load_files' or x.base_label == '<top (required)>' }

  [
    loc.path.sub(Dir.pwd, '.'),
    loc.lineno
  ]
end