Module: Appsignal::Hooks::Helpers Private

Included in:
DelayedJobPlugin, SidekiqPlugin, Integrations::ResqueActiveJobPlugin
Defined in:
lib/appsignal/hooks.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Instance Method Details

#string_or_inspect(string_or_other) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



58
59
60
61
62
63
64
# File 'lib/appsignal/hooks.rb', line 58

def string_or_inspect(string_or_other)
  if string_or_other.is_a?(String)
    string_or_other
  else
    string_or_other.inspect
  end
end

#truncate(text) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



66
67
68
# File 'lib/appsignal/hooks.rb', line 66

def truncate(text)
  text.size > 200 ? "#{text[0...197]}..." : text
end