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.



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

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.



68
69
70
# File 'lib/appsignal/hooks.rb', line 68

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