Class: X2CH::Board
- Inherits:
-
Object
- Object
- X2CH::Board
- Defined in:
- lib/x2ch.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
- #each(&blk) ⇒ Object
-
#initialize(url, name) ⇒ Board
constructor
A new instance of Board.
- #threads ⇒ Object
Constructor Details
#initialize(url, name) ⇒ Board
Returns a new instance of Board.
66 67 68 |
# File 'lib/x2ch.rb', line 66 def initialize(url, name) @url, @name = url, name end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
64 65 66 |
# File 'lib/x2ch.rb', line 64 def name @name end |
#url ⇒ Object
Returns the value of attribute url.
64 65 66 |
# File 'lib/x2ch.rb', line 64 def url @url end |
Instance Method Details
#each(&blk) ⇒ Object
74 75 76 77 78 |
# File 'lib/x2ch.rb', line 74 def each(&blk) threads.each{|t| yield t } end |
#threads ⇒ Object
70 71 72 |
# File 'lib/x2ch.rb', line 70 def threads() Subject.parse(@url, Subject.download(@url + '/subject.txt')) end |