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.
16 17 18 19 |
# File 'lib/debugtrace/log_buffer.rb', line 16 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.
10 11 12 |
# File 'lib/debugtrace/log_buffer.rb', line 10 def log @log end |
#nest_level ⇒ Object (readonly)
Returns the value of attribute nest_level.
10 11 12 |
# File 'lib/debugtrace/log_buffer.rb', line 10 def nest_level @nest_level end |
Instance Method Details
#to_s ⇒ String
Returns a string representation of this object.
24 25 26 |
# File 'lib/debugtrace/log_buffer.rb', line 24 def to_s return "(LogBuffer.LevelAndLog){nest_level: #{@nest_level}, log: \"#{@log}\"}" end |