Class: Simple2ch::Board
- Inherits:
-
Object
- Object
- Simple2ch::Board
- Defined in:
- lib/simple2ch/board.rb
Instance Attribute Summary collapse
-
#board_name ⇒ String
readonly
板の名前(コンピュータ名).
-
#server_name ⇒ String
readonly
サーバ名.
-
#title ⇒ String
readonly
板のタイトル.
-
#url ⇒ URI
readonly
板のURL.
Instance Method Summary collapse
-
#initialize(title, url) ⇒ Board
constructor
A new instance of Board.
-
#open2ch? ⇒ Boolean
おーぷん2chか否かを返す.
-
#thres ⇒ Array<Thre>
板に属する全てのスレッドを返す.
Constructor Details
#initialize(title, url) ⇒ Board
15 16 17 18 19 20 |
# File 'lib/simple2ch/board.rb', line 15 def initialize(title, url) @server_name = @board_name = nil @url = validate_url url @title = title @thres = [] end |
Instance Attribute Details
#board_name ⇒ String (readonly)
10 11 12 |
# File 'lib/simple2ch/board.rb', line 10 def board_name @board_name end |
#server_name ⇒ String (readonly)
8 9 10 |
# File 'lib/simple2ch/board.rb', line 8 def server_name @server_name end |
#title ⇒ String (readonly)
6 7 8 |
# File 'lib/simple2ch/board.rb', line 6 def title @title end |
#url ⇒ URI (readonly)
4 5 6 |
# File 'lib/simple2ch/board.rb', line 4 def url @url end |
Instance Method Details
#open2ch? ⇒ Boolean
おーぷん2chか否かを返す
34 35 36 |
# File 'lib/simple2ch/board.rb', line 34 def open2ch? @f_open2ch && true end |
#thres ⇒ Array<Thre>
板に属する全てのスレッドを返す
24 25 26 27 28 29 30 |
# File 'lib/simple2ch/board.rb', line 24 def thres if @thres.size > 0 @thres else fetch_all_thres end end |