Module: Bbs
- Defined in:
- lib/bbiff/bbs_reader.rb
Defined Under Namespace
Modules: Nichan, Shitaraba Classes: BoardBase, Downloader, NotFoundError, Post, ThreadBase
Constant Summary collapse
- BOARD_CLASSES =
Bbs.create_board(url) → Shitaraba::Board | Nichan::Board Bbs.create_thread(url) → Shitaraba::Thread | Nichan::Thread
[Shitaraba::Board, Nichan::Board].freeze
- THREAD_CLASSES =
[Shitaraba::Thread, Nichan::Thread].freeze
Class Method Summary collapse
Class Method Details
.create_board(url) ⇒ Object
399 400 401 402 403 404 405 |
# File 'lib/bbiff/bbs_reader.rb', line 399 def create_board(url) BOARD_CLASSES.each do |klass| board = klass.from_url(url) return board if board end return nil end |
.create_thread(url) ⇒ Object
408 409 410 411 412 413 414 |
# File 'lib/bbiff/bbs_reader.rb', line 408 def create_thread(url) THREAD_CLASSES.each do |klass| thread = klass.from_url(url) return thread if thread end return nil end |