Module: Snooby::Posts

Included in:
Subreddit, User
Defined in:
lib/snooby/actions.rb

Instance Method Summary collapse

Instance Method Details

#posts(count = 25) ⇒ Object

Returns an array of structs containing the calling object’s posts.



12
13
14
15
# File 'lib/snooby/actions.rb', line 12

def posts(count = 25)
  path = @name ? :"#{@kind}_posts" : :reddit
  Snooby.build(Post, path, @name, count)
end