Class: RubySnooper::TraceWriter::Line
- Inherits:
-
Object
- Object
- RubySnooper::TraceWriter::Line
- Defined in:
- lib/ruby_snooper/trace_writer.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#event ⇒ Object
readonly
Returns the value of attribute event.
-
#local_variables ⇒ Object
readonly
Returns the value of attribute local_variables.
-
#method_id ⇒ Object
readonly
Returns the value of attribute method_id.
-
#modified_variables ⇒ Object
readonly
Returns the value of attribute modified_variables.
-
#new_variables ⇒ Object
readonly
Returns the value of attribute new_variables.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#time ⇒ Object
readonly
Returns the value of attribute time.
Instance Method Summary collapse
-
#initialize(method_id, event, number, time, code, local_variables, new_variables, modified_variables, file_path) ⇒ Line
constructor
A new instance of Line.
- #print ⇒ Object
Constructor Details
#initialize(method_id, event, number, time, code, local_variables, new_variables, modified_variables, file_path) ⇒ Line
Returns a new instance of Line.
64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/ruby_snooper/trace_writer.rb', line 64 def initialize(method_id, event, number, time, code, local_variables, new_variables, modified_variables, file_path) @method_id = method_id @event = event @number = number @time = time @code = code @local_variables = local_variables @new_variables = new_variables @modified_variables = modified_variables @file_path = file_path end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
62 63 64 |
# File 'lib/ruby_snooper/trace_writer.rb', line 62 def code @code end |
#event ⇒ Object (readonly)
Returns the value of attribute event.
62 63 64 |
# File 'lib/ruby_snooper/trace_writer.rb', line 62 def event @event end |
#local_variables ⇒ Object (readonly)
Returns the value of attribute local_variables.
62 63 64 |
# File 'lib/ruby_snooper/trace_writer.rb', line 62 def local_variables @local_variables end |
#method_id ⇒ Object (readonly)
Returns the value of attribute method_id.
62 63 64 |
# File 'lib/ruby_snooper/trace_writer.rb', line 62 def method_id @method_id end |
#modified_variables ⇒ Object (readonly)
Returns the value of attribute modified_variables.
62 63 64 |
# File 'lib/ruby_snooper/trace_writer.rb', line 62 def modified_variables @modified_variables end |
#new_variables ⇒ Object (readonly)
Returns the value of attribute new_variables.
62 63 64 |
# File 'lib/ruby_snooper/trace_writer.rb', line 62 def new_variables @new_variables end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
62 63 64 |
# File 'lib/ruby_snooper/trace_writer.rb', line 62 def number @number end |
#time ⇒ Object (readonly)
Returns the value of attribute time.
62 63 64 |
# File 'lib/ruby_snooper/trace_writer.rb', line 62 def time @time end |
Instance Method Details
#print ⇒ Object
76 77 78 79 80 |
# File 'lib/ruby_snooper/trace_writer.rb', line 76 def print STDERR.puts "From #{@file_path}" if @event == :call print_variables STDERR.puts "#{Time.now.strftime("%T,%L")} #{@event} #{number} #{code}" end |