Module: Appsignal::Hooks::Helpers

Defined in:
lib/appsignal/hooks.rb

Instance Method Summary collapse

Instance Method Details

#string_or_inspect(string_or_other) ⇒ Object



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

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



70
71
72
# File 'lib/appsignal/hooks.rb', line 70

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