class Sirius::Thread

All threads from request maps on this class

Attributes

board[RW]
image_count[RW]
omit[RW]
omitimages[RW]
posts[RW]
reply_count[RW]

Public Class Methods

new(json) click to toggle source

Get Hash{:image_count => “10” …} and generate attributes

# File lib/sirius/thread.rb, line 13
def initialize(json)
  json.each do |key, value|
    self.send("#{key}=", value)
  end
end

Public Instance Methods

load() click to toggle source

Load thread

Summary

When you get all threads from page, you take only limit posts from thread, but with this method you can load all posts for thread.

Example

Api::PR::page.first.size # => 6
# But with `load`
Api::PR::page.first.load.size # => 100
# File lib/sirius/thread.rb, line 38
def load
  Api::thread(board, posts.first.num)
end
Also aliased as: load!
load!()

TODO

add +more+ method = for ajax loading posts from thread
alias :moar :more
Alias for: load