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.



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

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.



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

def log
  @log
end

#nest_levelObject (readonly)

Returns the value of attribute nest_level.



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

def nest_level
  @nest_level
end

Instance Method Details

#to_sObject



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

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