Module: Redd::Models::Reportable

Included in:
Comment, PrivateMessage, Submission
Defined in:
lib/redd/models/reportable.rb

Overview

Things that can be reported (except users).

Instance Method Summary collapse

Instance Method Details

#report(reason) ⇒ Object

Report the object.

Parameters:

  • reason (String)

    the report reason


9
10
11
# File 'lib/redd/models/reportable.rb', line 9

def report(reason)
  client.post('/api/report', thing_id: read_attribute(:name), reason: reason)
end