Class: Sqreen::Context

Inherits:
Object
  • Object
show all
Defined in:
lib/sqreen/context.rb

Overview

Context

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeContext

Returns a new instance of Context.



15
16
17
# File 'lib/sqreen/context.rb', line 15

def initialize
  @bt = get_current_backtrace
end

Instance Attribute Details

#btObject

Returns the value of attribute bt.



9
10
11
# File 'lib/sqreen/context.rb', line 9

def bt
  @bt
end

Class Method Details

.btObject



11
12
13
# File 'lib/sqreen/context.rb', line 11

def self.bt
  Context.new.bt
end

Instance Method Details

#==(other) ⇒ Object



24
25
26
# File 'lib/sqreen/context.rb', line 24

def ==(other)
  other.bt == @bt
end

#get_current_backtraceObject



19
20
21
22
# File 'lib/sqreen/context.rb', line 19

def get_current_backtrace
  # Force caller to be resolved now
  caller.map(&:to_s)
end