Method: Hatchet::NestedDiagnosticContext::ContextStack#pop

Defined in:
lib/hatchet/nested_diagnostic_context.rb

#pop(n = nil) ⇒ Object

Internal: Removes one or more message from the stack.

n - The number of messages to remove from the cstack (default: nil). If

no number is provided then one message will be removed.

Returns the message or messages removed from the context stack. If n was not specified it will return a single message, otherwise it will return an Array of up to n messages.



147
148
149
150
151
152
153
# File 'lib/hatchet/nested_diagnostic_context.rb', line 147

def pop(n = nil)
  if n
    @stack.pop(n)
  else
    @stack.pop
  end
end