Class: Vernier::StackTableHelpers::Frame

Inherits:
BaseType
  • Object
show all
Defined in:
lib/vernier/stack_table_helpers.rb

Instance Attribute Summary

Attributes inherited from BaseType

#idx, #stack_table

Instance Method Summary collapse

Methods inherited from BaseType

#initialize, #inspect

Constructor Details

This class inherits a constructor from Vernier::StackTableHelpers::BaseType

Instance Method Details

#filenameObject



81
# File 'lib/vernier/stack_table_helpers.rb', line 81

def filename; func.filename; end

#funcObject



84
85
86
87
# File 'lib/vernier/stack_table_helpers.rb', line 84

def func
  func_idx = stack_table.frame_func_idx(idx)
  Func.new(stack_table, func_idx)
end

#labelObject Also known as: name



80
# File 'lib/vernier/stack_table_helpers.rb', line 80

def label; func.label; end

#lineObject Also known as: lineno



89
90
91
# File 'lib/vernier/stack_table_helpers.rb', line 89

def line
  stack_table.frame_line_no(idx)
end

#to_sObject



94
95
96
97
98
99
100
# File 'lib/vernier/stack_table_helpers.rb', line 94

def to_s
  if (line = self.line) == 0
    func.to_s
  else
    "#{func}:#{line}"
  end
end