Class: Masuda::Entry

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

Overview

Diary

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(diary, id, title, content, time, tb_num) ⇒ Entry

Returns a new instance of Entry.



244
245
246
247
248
249
250
251
# File 'lib/masuda.rb', line 244

def initialize(diary, id, title, content, time, tb_num)
  @diary = diary
  @id = id
  @title = title
  @content = content
  @time = time
  @tb_num = tb_num
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



240
241
242
# File 'lib/masuda.rb', line 240

def content
  @content
end

#diaryObject (readonly)

Returns the value of attribute diary.



240
241
242
# File 'lib/masuda.rb', line 240

def diary
  @diary
end

#idObject (readonly)

Returns the value of attribute id.



240
241
242
# File 'lib/masuda.rb', line 240

def id
  @id
end

#tb_numObject

Returns the value of attribute tb_num.



242
243
244
# File 'lib/masuda.rb', line 242

def tb_num
  @tb_num
end

#timeObject (readonly)

Returns the value of attribute time.



240
241
242
# File 'lib/masuda.rb', line 240

def time
  @time
end

#titleObject (readonly)

Returns the value of attribute title.



240
241
242
# File 'lib/masuda.rb', line 240

def title
  @title
end

#trackbacksObject



253
254
255
# File 'lib/masuda.rb', line 253

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