Class: Raven::Breadcrumb

Inherits:
Object show all
Defined in:
lib/raven/breadcrumbs.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBreadcrumb

Returns a new instance of Breadcrumb.



5
6
7
8
9
10
11
12
# File 'lib/raven/breadcrumbs.rb', line 5

def initialize
  @category = nil
  @data = {}
  @level = nil
  @message = nil
  @timestamp = Time.now.to_i
  @type = nil
end

Instance Attribute Details

#categoryObject

Returns the value of attribute category.



3
4
5
# File 'lib/raven/breadcrumbs.rb', line 3

def category
  @category
end

#dataObject

Returns the value of attribute data.



3
4
5
# File 'lib/raven/breadcrumbs.rb', line 3

def data
  @data
end

#levelObject

Returns the value of attribute level.



3
4
5
# File 'lib/raven/breadcrumbs.rb', line 3

def level
  @level
end

#messageObject

Returns the value of attribute message.



3
4
5
# File 'lib/raven/breadcrumbs.rb', line 3

def message
  @message
end

#timestampObject

Returns the value of attribute timestamp.



3
4
5
# File 'lib/raven/breadcrumbs.rb', line 3

def timestamp
  @timestamp
end

#typeObject

Returns the value of attribute type.



3
4
5
# File 'lib/raven/breadcrumbs.rb', line 3

def type
  @type
end

Instance Method Details

#to_hashObject



14
15
16
17
18
19
20
21
22
23
# File 'lib/raven/breadcrumbs.rb', line 14

def to_hash
  {
    :category => @category,
    :data => @data,
    :level => @level,
    :message => @message,
    :timestamp => @timestamp,
    :type => @type
  }
end