Method: Lines.context

Defined in:
lib/lines.rb

.context(data = {}) {|new_context| ... } ⇒ Object

Add data to the logs

data - a ruby hash

return a Context instance

Yields:

  • (new_context)


84
85
86
87
88
# File 'lib/lines.rb', line 84

def context(data={})
  new_context = Context.new ensure_hash!(data)
  yield new_context if block_given?
  new_context
end