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.
43 44 45 |
# File 'lib/vedeu/api/log.rb', line 43 def initialize( = {}) @options = end |
Class Method Details
.call(options = {}) ⇒ Object
39 40 41 |
# File 'lib/vedeu/api/log.rb', line 39 def self.call( = {}) new().trace end |
Instance Method Details
#trace ⇒ Object
47 48 49 50 51 52 53 54 55 56 |
# File 'lib/vedeu/api/log.rb', line 47 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 |