Class: Serel::Post

Inherits:
Base
  • Object
show all
Defined in:
lib/serel/post.rb

Instance Method Summary collapse

Methods inherited from Base

#[], #[]=, #all, associations, attribute, config, #find, finder_methods, #get, #initialize, #inspect, #meth, method_missing, #network, network_wide, new_relation, request, respond_to?, #type, with_ids

Constructor Details

This class inherits a constructor from Serel::Base

Instance Method Details

#commentsObject



18
19
20
# File 'lib/serel/post.rb', line 18

def comments
  type(:comment).url("posts/#{id}/comments")
end

#revisionsObject



22
23
24
# File 'lib/serel/post.rb', line 22

def revisions
  type(:revision).url("posts/#{id}/revisions")
end

#suggested_editsObject



26
27
28
# File 'lib/serel/post.rb', line 26

def suggested_edits
  type(:suggested_edit).url("posts/#{id}/suggested-edits")
end