Module: Bbs
- Defined in:
- lib/bbiff/bbs_reader.rb
Defined Under Namespace
Modules: Nichan, Shitaraba Classes: BoardBase, Downloader, FormatError, 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
411 412 413 414 415 416 417 |
# File 'lib/bbiff/bbs_reader.rb', line 411 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
420 421 422 423 424 425 426 |
# File 'lib/bbiff/bbs_reader.rb', line 420 def create_thread(url) THREAD_CLASSES.each do |klass| thread = klass.from_url(url) return thread if thread end return nil end |