Sha256: 628bfe406a59a263cb8b895eb27a1d2b31445d2ad2634da871c083bc1c367f00

Contents?: true

Size: 400 Bytes

Versions: 5

Compression:

Stored size: 400 Bytes

Contents

require_relative "thing"

module Redd
  module Objects
    # The model for private messages
    class PrivateMessage < Thing
      include Thing::Inboxable

      alias_property :from, :author
      alias_property :to, :dest

      # Block the sender of the message from sending any more.
      def block_sender!
        post("/api/block", id: fullname)
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
redd-0.7.4 lib/redd/objects/private_message.rb
redd-0.7.3 lib/redd/objects/private_message.rb
redd-0.7.2 lib/redd/objects/private_message.rb
redd-0.7.1 lib/redd/objects/private_message.rb
redd-0.7.0 lib/redd/objects/private_message.rb