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.



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

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

Instance Attribute Details

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#urlObject

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

#threadsObject



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

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