class RuboCop::CachedData
def serialize_offense(offense)
def serialize_offense(offense) { # Calling #to_s here ensures that the serialization works when using # other json serializers such as Oj. Some of these gems do not call # #to_s implicitly. severity: offense.severity.to_s, location: { begin_pos: offense.location.begin_pos, end_pos: offense.location.end_pos }, message: message(offense), cop_name: offense.cop_name, status: offense.status } end