Class: Vedeu::API::Trace
- Inherits:
-
Object
- Object
- Vedeu::API::Trace
- Defined in:
- lib/vedeu/api/log.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Trace
constructor
A new instance of Trace.
- #trace ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Trace
Returns a new instance of Trace.
44 45 46 |
# File 'lib/vedeu/api/log.rb', line 44 def initialize( = {}) = end |
Class Method Details
.call(options = {}) ⇒ Object
40 41 42 |
# File 'lib/vedeu/api/log.rb', line 40 def self.call( = {}) new().trace end |
Instance Method Details
#trace ⇒ Object
48 49 50 51 52 53 54 55 56 57 |
# File 'lib/vedeu/api/log.rb', line 48 def trace set_trace_func proc { |event, file, line, id, binding, classname| if event == watched && classname.to_s.match(klass) Vedeu.log(sprintf(" %s %-35s #%s", event, classname, id)) # binding.eval('local_variables').each do |var| # print("#{var.to_s} = #{binding.local_variable_get(var).inspect}\n") # end end } end |