Class: ExtendedLogger::Message

Inherits:
Struct
  • Object
show all
Defined in:
lib/extended_logger/message.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#blockObject

Returns the value of attribute block

Returns:

  • (Object)

    the current value of block



2
3
4
# File 'lib/extended_logger/message.rb', line 2

def block
  @block
end

#labelObject

Returns the value of attribute label

Returns:

  • (Object)

    the current value of label



2
3
4
# File 'lib/extended_logger/message.rb', line 2

def label
  @label
end

#levelObject

Returns the value of attribute level

Returns:

  • (Object)

    the current value of level



2
3
4
# File 'lib/extended_logger/message.rb', line 2

def level
  @level
end

#proseObject



9
10
11
# File 'lib/extended_logger/message.rb', line 9

def prose
  @prose ||= block.()
end

#timeObject

Returns the value of attribute time

Returns:

  • (Object)

    the current value of time



2
3
4
# File 'lib/extended_logger/message.rb', line 2

def time
  @time
end

Instance Method Details

#inspectObject



5
6
7
# File 'lib/extended_logger/message.rb', line 5

def inspect
  "#<ExtendedLogger::Message prose=#{prose.inspect}, level=#{level}, time=#{time.iso8601}, label=#{label.inspect}>"
end