class Bbs::Post

Attributes

body[R]
date[R]
mail[R]
name[R]
no[R]

Public Class Methods

from_s(str) click to toggle source
# File lib/bbiff/bbs_reader.rb, line 14
def from_s(str)
  Post.new(*str.split('<>', 5))
end
new(no, name, mail, date, body) click to toggle source
# File lib/bbiff/bbs_reader.rb, line 21
def initialize(no, name, mail, date, body)
  @no = no.to_i
  @name = name
  @mail = mail
  @date = date
  @body = body
end

Public Instance Methods

to_s() click to toggle source

削除された時のフィールドの値は、掲示板の設定によるなぁ。 def deleted?

@date == '<削除>'

end

# File lib/bbiff/bbs_reader.rb, line 34
def to_s
  [no, name, mail, date, body].join('<>')
end