Class: Errapi::Plugins::Location

Inherits:
Base
  • Object
show all
Defined in:
lib/errapi/plugins/location.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#name, plugin_name

Instance Attribute Details

#camelizeObject

Returns the value of attribute camelize.



6
7
8
# File 'lib/errapi/plugins/location.rb', line 6

def camelize
  @camelize
end

#config=(value) ⇒ Object (writeonly)

Sets the attribute config

Parameters:

  • value

    the value to set the attribute config to.



5
6
7
# File 'lib/errapi/plugins/location.rb', line 5

def config=(value)
  @config = value
end

Instance Method Details

#serialize_error(error, serialized) ⇒ Object



8
9
10
11
12
13
14
15
16
17
# File 'lib/errapi/plugins/location.rb', line 8

def serialize_error error, serialized
  if error.location && error.location.respond_to?(:serialize)

    serialized_location = error.location.serialize
    unless serialized_location.nil?
      serialized[:location] = serialized_location
      serialized[location_type_key] = error.location.location_type if error.location.respond_to? :location_type
    end
  end
end