Class: Masuda::Trackback
- Inherits:
-
Object
- Object
- Masuda::Trackback
- Defined in:
- lib/masuda.rb
Overview
Entry
Instance Attribute Summary collapse
-
#diary ⇒ Object
readonly
Returns the value of attribute diary.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#parent ⇒ Object
readonly
Returns the value of attribute parent.
-
#snippet ⇒ Object
readonly
Returns the value of attribute snippet.
-
#trackbacks ⇒ Object
Returns the value of attribute trackbacks.
Instance Method Summary collapse
- #entry ⇒ Object
-
#initialize(diary, parent, id, snippet) ⇒ Trackback
constructor
A new instance of Trackback.
- #tb_num ⇒ Object
Constructor Details
#initialize(diary, parent, id, snippet) ⇒ Trackback
Returns a new instance of Trackback.
262 263 264 265 266 267 |
# File 'lib/masuda.rb', line 262 def initialize(diary, parent, id, snippet) @diary = diary @parent = parent @id = id @snippet = snippet end |
Instance Attribute Details
#diary ⇒ Object (readonly)
Returns the value of attribute diary.
259 260 261 |
# File 'lib/masuda.rb', line 259 def diary @diary end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
259 260 261 |
# File 'lib/masuda.rb', line 259 def id @id end |
#parent ⇒ Object (readonly)
Returns the value of attribute parent.
259 260 261 |
# File 'lib/masuda.rb', line 259 def parent @parent end |
#snippet ⇒ Object (readonly)
Returns the value of attribute snippet.
259 260 261 |
# File 'lib/masuda.rb', line 259 def snippet @snippet end |
#trackbacks ⇒ Object
Returns the value of attribute trackbacks.
260 261 262 |
# File 'lib/masuda.rb', line 260 def trackbacks @trackbacks end |
Instance Method Details
#entry ⇒ Object
269 270 271 |
# File 'lib/masuda.rb', line 269 def entry @entry or @entry = @diary.entry(@id) end |
#tb_num ⇒ Object
273 274 275 |
# File 'lib/masuda.rb', line 273 def tb_num @trackbacks ? @trackbacks.length : 0 end |