Class: Raygun::Breadcrumbs::Breadcrumb
- Inherits:
-
Object
- Object
- Raygun::Breadcrumbs::Breadcrumb
- Defined in:
- lib/raygun/breadcrumbs/breadcrumb.rb
Constant Summary collapse
- ATTRIBUTES =
[ :message, :category, :metadata, :class_name, :method_name, :line_number, :timestamp, :level, :type ]
Instance Method Summary collapse
Instance Method Details
#build_payload ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/raygun/breadcrumbs/breadcrumb.rb', line 11 def build_payload payload = { message: , category: category, level: Breadcrumbs::BREADCRUMB_LEVELS.index(level), CustomData: , timestamp: , type: type } payload[:location] = "#{class_name}:#{method_name}" unless class_name == nil payload[:location] += ":#{line_number}" if payload.has_key?(:location) && line_number != nil Hash[payload.select do |k, v| v != nil end] end |
#size ⇒ Object
29 30 31 |
# File 'lib/raygun/breadcrumbs/breadcrumb.rb', line 29 def size return .length + 100 end |