Class: Masuda::Trackback

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

Overview

Entry

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#diaryObject (readonly)

Returns the value of attribute diary.



259
260
261
# File 'lib/masuda.rb', line 259

def diary
  @diary
end

#idObject (readonly)

Returns the value of attribute id.



259
260
261
# File 'lib/masuda.rb', line 259

def id
  @id
end

#parentObject (readonly)

Returns the value of attribute parent.



259
260
261
# File 'lib/masuda.rb', line 259

def parent
  @parent
end

#snippetObject (readonly)

Returns the value of attribute snippet.



259
260
261
# File 'lib/masuda.rb', line 259

def snippet
  @snippet
end

#trackbacksObject

Returns the value of attribute trackbacks.



260
261
262
# File 'lib/masuda.rb', line 260

def trackbacks
  @trackbacks
end

Instance Method Details

#entryObject



269
270
271
# File 'lib/masuda.rb', line 269

def entry
  @entry or @entry = @diary.entry(@id)
end

#tb_numObject



273
274
275
# File 'lib/masuda.rb', line 273

def tb_num
  @trackbacks ? @trackbacks.length : 0
end