Class: Snooby::Post

Inherits:
Struct
  • Object
show all
Includes:
Comments, Delete, Reply, Voting
Defined in:
lib/snooby/post.rb

Instance Method Summary collapse

Methods included from Comments

#comments

Methods included from Reply

#reply

Methods included from Delete

#delete

Methods included from Voting

#downvote, #rescind, #upvote, #vote

Constructor Details

#initializePost



6
7
8
9
# File 'lib/snooby/post.rb', line 6

def initialize(*)
  super
  @kind = 'post'
end

Instance Method Details

#hide(un = '') ⇒ Object



19
20
21
# File 'lib/snooby/post.rb', line 19

def hide(un = '')
  Snooby.request Paths[:"#{un}hide"], :id => self.name
end

#mark(un = '') ⇒ Object



27
28
29
# File 'lib/snooby/post.rb', line 27

def mark(un = '')
  Snooby.request Paths[:"#{un}mark"], :id => self.name
end

#save(un = '') ⇒ Object



11
12
13
# File 'lib/snooby/post.rb', line 11

def save(un = '')
  Snooby.request Paths[:"#{un}save"], :id => self.name
end

#unhideObject



23
24
25
# File 'lib/snooby/post.rb', line 23

def unhide
  hide 'un'
end

#unmarkObject



31
32
33
# File 'lib/snooby/post.rb', line 31

def unmark
  mark 'un'
end

#unsaveObject



15
16
17
# File 'lib/snooby/post.rb', line 15

def unsave
  save 'un'
end