Module: Snooby::Compose
Instance Method Summary collapse
-
#compose(subject, text) ⇒ Object
(also: #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.
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.
59 60 61 62 63 64 65 |
# File 'lib/snooby/actions.rb', line 59 def compose(subject, text) raise RedditError, 'You are not logged in.' unless Snooby.active to = (@kind == 'user' ? '' : '#') + @name data = {:to => to, :subject => subject, :text => text} Snooby.request(Paths[:compose], data) end |