Class: Bbs::Post
- Inherits:
-
Object
- Object
- Bbs::Post
- Defined in:
- lib/bbiff/bbs_reader.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#mail ⇒ Object
readonly
Returns the value of attribute mail.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#no ⇒ Object
readonly
Returns the value of attribute no.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(no, name, mail, date, body) ⇒ Post
constructor
A new instance of Post.
-
#to_s ⇒ Object
削除された時のフィールドの値は、掲示板の設定によるなぁ。 def deleted? @date == ‘<削除>’ end.
Constructor Details
#initialize(no, name, mail, date, body) ⇒ Post
Returns a new instance of Post.
19 20 21 22 23 24 25 |
# File 'lib/bbiff/bbs_reader.rb', line 19 def initialize(no, name, mail, date, body) @no = no.to_i @name = name @mail = mail @date = date @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
17 18 19 |
# File 'lib/bbiff/bbs_reader.rb', line 17 def body @body end |
#date ⇒ Object (readonly)
Returns the value of attribute date.
17 18 19 |
# File 'lib/bbiff/bbs_reader.rb', line 17 def date @date end |
#mail ⇒ Object (readonly)
Returns the value of attribute mail.
17 18 19 |
# File 'lib/bbiff/bbs_reader.rb', line 17 def mail @mail end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
17 18 19 |
# File 'lib/bbiff/bbs_reader.rb', line 17 def name @name end |
#no ⇒ Object (readonly)
Returns the value of attribute no.
17 18 19 |
# File 'lib/bbiff/bbs_reader.rb', line 17 def no @no end |
Class Method Details
Instance Method Details
#to_s ⇒ Object
削除された時のフィールドの値は、掲示板の設定によるなぁ。def deleted?
@date == '<削除>'
end
32 33 34 |
# File 'lib/bbiff/bbs_reader.rb', line 32 def to_s [no, name, mail, date, body].join('<>') end |