Class: LogBuffer::LevelAndLog
- Inherits:
-
Object
- Object
- LogBuffer::LevelAndLog
- Defined in:
- lib/debugtrace/log_buffer.rb
Overview
Contains a single line indentation level and log content.
Instance Attribute Summary collapse
-
#log ⇒ Object
readonly
Returns the value of attribute log.
-
#nest_level ⇒ Object
readonly
Returns the value of attribute nest_level.
Instance Method Summary collapse
-
#initialize(nest_level, log) ⇒ LevelAndLog
constructor
Initializes this object.
-
#to_s ⇒ String
Returns a string representation of this object.
Constructor Details
#initialize(nest_level, log) ⇒ LevelAndLog
Initializes this object.
15 16 17 18 |
# File 'lib/debugtrace/log_buffer.rb', line 15 def initialize(nest_level, log) @nest_level = Common.check_type('nest_level', nest_level, Integer) @log = Common.check_type('log', log, String) end |
Instance Attribute Details
#log ⇒ Object (readonly)
Returns the value of attribute log.
9 10 11 |
# File 'lib/debugtrace/log_buffer.rb', line 9 def log @log end |
#nest_level ⇒ Object (readonly)
Returns the value of attribute nest_level.
9 10 11 |
# File 'lib/debugtrace/log_buffer.rb', line 9 def nest_level @nest_level end |
Instance Method Details
#to_s ⇒ String
Returns a string representation of this object.
23 24 25 |
# File 'lib/debugtrace/log_buffer.rb', line 23 def to_s return "(LogBuffer.LevelAndLog){nest_level: #{@nest_level}, log: \"#{@log}\"}" end |