class Sentry::BreadcrumbBuffer
Experimental RBS support (using type sampling data from the type_fusion
project).
# sig/sentry/breadcrumb_buffer.rbs class Sentry::BreadcrumbBuffer def record: (Sentry::Breadcrumb crumb) -> untyped end
def dup
-
(BreadcrumbBuffer)
-
def dup copy = super copy.buffer = buffer.deep_dup copy end
def each(&block)
-
(Array)
-
Other tags:
- Yieldparam: crumb -
Parameters:
-
block
(Proc
) --
def each(&block) members.each(&block) end
def empty?
-
(Boolean)
-
def empty? members.none? end
def initialize(size = nil)
-
size
(Integer, nil
) -- If it's not provided, it'll fallback to DEFAULT_SIZE
def initialize(size = nil) @buffer = Array.new(size || DEFAULT_SIZE) end
def members
-
(Array)
-
def members @buffer.compact end
def peek
-
(Breadcrumb, nil)
-
def peek members.last end
def record(crumb)
Experimental RBS support (using type sampling data from the type_fusion
project).
def record: (Sentry::Breadcrumb crumb) -> untyped
This signature was generated using 3 samples from 1 application.
-
(void)
-
Parameters:
-
crumb
(Breadcrumb
) --
def record(crumb) yield(crumb) if block_given? @buffer.slice!(0) @buffer << crumb end
def to_hash
-
(Hash)
-
def to_hash { values: members.map(&:to_hash) } end