Module: Diary::Item::Data
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
- #author ⇒ Object
- #email ⇒ Object
- #initialize(*args) ⇒ Object
- #published_at ⇒ Object
- #reload_data ⇒ Object
- #title ⇒ Object
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
4 5 6 |
# File 'lib/diary/item/data.rb', line 4 def data @data end |
Instance Method Details
#author ⇒ Object
15 16 17 |
# File 'lib/diary/item/data.rb', line 15 def data. end |
#email ⇒ Object
23 24 25 |
# File 'lib/diary/item/data.rb', line 23 def email data.email end |
#initialize(*args) ⇒ Object
6 7 8 9 |
# File 'lib/diary/item/data.rb', line 6 def initialize(*args) super load_data end |
#published_at ⇒ Object
19 20 21 |
# File 'lib/diary/item/data.rb', line 19 def published_at Time.parse(data.published_at) end |
#reload_data ⇒ Object
27 28 29 |
# File 'lib/diary/item/data.rb', line 27 def reload_data @data = load_data end |
#title ⇒ Object
11 12 13 |
# File 'lib/diary/item/data.rb', line 11 def title data.title end |