Class: LogBuffer::LevelAndLog

Inherits:
Object
  • Object
show all
Defined in:
lib/debugtrace/log_buffer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(nest_level, log) ⇒ LevelAndLog

Initializes this object.



9
10
11
12
# File 'lib/debugtrace/log_buffer.rb', line 9

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

#logObject (readonly)

Returns the value of attribute log.



14
15
16
# File 'lib/debugtrace/log_buffer.rb', line 14

def log
  @log
end

#nest_levelObject (readonly)

Returns the value of attribute nest_level.



14
15
16
# File 'lib/debugtrace/log_buffer.rb', line 14

def nest_level
  @nest_level
end

Instance Method Details

#to_sObject



16
17
18
# File 'lib/debugtrace/log_buffer.rb', line 16

def to_s
  "(LogBuffer.LevelAndLog){nest_level: #{@nest_level}, log: \"#{@log}\"}"
end