Module: Snooby::Compose

Included in:
Subreddit, User
Defined in:
lib/snooby/actions.rb

Instance Method Summary collapse

Instance Method Details

#compose(subject, text) ⇒ Object Also known as: message

Sends a message to the calling object, which is either a subreddit or a user; in the case of the former, this behaves like moderator mail.



48
49
50
51
52
# File 'lib/snooby/actions.rb', line 48

def compose(subject, text)
  to = (@kind == 'user' ? '' : '#') + @name
  data = {:to => to, :subject => subject, :text => text}
  Snooby.request Paths[:compose], data
end