Skip to content

Commit

Permalink
Breadcrumbs/Configuration: Added yardoc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Cawllec committed Dec 7, 2018
1 parent 19e0e28 commit 5f763e3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/bugsnag/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,14 @@ class Configuration
attr_accessor :auto_capture_sessions
attr_accessor :track_sessions
attr_accessor :session_endpoint

##
# @param [Array] array of strings indicating allowable automatic breadcrumb types
# @return [Array] indicates the allowable automatic breadcrumbs
attr_accessor :automatic_breadcrumb_types

##
# @return [Integer] the maximum allowable amount of breadcrumbs per thread
attr_reader :max_breadcrumbs

API_KEY_REGEX = /[0-9a-f]{32}/i
Expand Down Expand Up @@ -205,19 +211,25 @@ def parse_proxy(uri)

##
# Sets the maximum allowable amount of breadcrumbs
#
# @param [Integer] the new maximum breadcrumb limit
def max_breadcrumbs=(new_max_breadcrumbs)
@max_breadcrumbs = new_max_breadcrumbs
breadcrumbs.max_items = new_max_breadcrumbs
end

##
# Returns the breadcrumb circular buffer
#
# @return [Bugsnag::Utility::CircularBuffer] a thread based circular buffer containing breadcrumbs
def breadcrumbs
request_data[:breadcrumbs] ||= Bugsnag::Utility::CircularBuffer.new(@max_breadcrumbs)
end

##
# Stores callbacks that will be run before a breadcrumb is left
#
# @return [Array] a thread independent array of callback functions
def before_breadcrumb_callbacks
@before_breadcrumb_callbacks ||= []
end
Expand Down

0 comments on commit 5f763e3

Please sign in to comment.