Class: X2CH::Thread
- Inherits:
-
Object
- Object
- X2CH::Thread
- Defined in:
- lib/x2ch.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#num ⇒ Object
Returns the value of attribute num.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
- #each(&blk) ⇒ Object
-
#initialize(url, dat, name, num) ⇒ Thread
constructor
A new instance of Thread.
- #posts ⇒ Object
Constructor Details
#initialize(url, dat, name, num) ⇒ Thread
Returns a new instance of Thread.
83 84 85 |
# File 'lib/x2ch.rb', line 83 def initialize(url, dat, name, num) @url, @dat, @name, @num = url, dat, name, num end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
81 82 83 |
# File 'lib/x2ch.rb', line 81 def name @name end |
#num ⇒ Object
Returns the value of attribute num.
81 82 83 |
# File 'lib/x2ch.rb', line 81 def num @num end |
#url ⇒ Object
Returns the value of attribute url.
81 82 83 |
# File 'lib/x2ch.rb', line 81 def url @url end |
Instance Method Details
#each(&blk) ⇒ Object
91 92 93 94 95 |
# File 'lib/x2ch.rb', line 91 def each(&blk) posts.each{|p| yield p } end |
#posts ⇒ Object
87 88 89 |
# File 'lib/x2ch.rb', line 87 def posts Dat.parse(Dat.download(@url + "dat/" + @dat)) end |