Class: The86::Client::Post

Inherits:
Resource show all
Includes:
CanBeHidden
Defined in:
lib/the86-client/post.rb

Instance Attribute Summary

Attributes inherited from Resource

#oauth_token, #parent

Instance Method Summary collapse

Methods included from CanBeHidden

#hide, #unhide

Methods inherited from Resource

#==, accepts_nested_attributes_for, belongs_to, collection_path, #delete!, has_many, has_one, #load, model_name, #patch, path, #persisted?, #resource_path, #save, #sendable_attributes, #to_key, #to_model, #to_param, #url_id

Instance Method Details

#reply(attributes) ⇒ Object



25
26
27
28
29
# File 'lib/the86-client/post.rb', line 25

def reply(attributes)
  conversation.posts.create(
      attributes.merge(in_reply_to_id: id)
  )
end

#reply?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/the86-client/post.rb', line 21

def reply?
  !!in_reply_to_id
end