Class: X2CH::Board

Inherits:
Object
  • Object
show all
Defined in:
lib/x2ch.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url, name) ⇒ Board

Returns a new instance of Board.



67
68
69
# File 'lib/x2ch.rb', line 67

def initialize(url, name)
  @url, @name = url, name
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



65
66
67
# File 'lib/x2ch.rb', line 65

def name
  @name
end

#urlObject

Returns the value of attribute url.



65
66
67
# File 'lib/x2ch.rb', line 65

def url
  @url
end

Instance Method Details

#each(&blk) ⇒ Object



75
76
77
78
79
# File 'lib/x2ch.rb', line 75

def each(&blk)
  threads.each{|t|
    yield t
  }
end

#threadsObject



71
72
73
# File 'lib/x2ch.rb', line 71

def threads()
  Subject.parse(@url, Subject.download(@url + '/subject.txt'))
end