Method: Yog.context

Defined in:
lib/yog.rb

.context(**fields) ⇒ Object

Add fields to all Yog() calls in the given block.



77
78
79
80
81
# File 'lib/yog.rb', line 77

def self.context(**fields)
  yield logs.unshift(with(fields))
ensure
  logs.shift
end