Class: Everlog::Dom::Value::Hatena
Instance Method Summary
collapse
Methods included from Maybe
#maybe
#initialize, #parse_to_His
Instance Method Details
#issued ⇒ Object
13
14
15
16
17
18
|
# File 'lib/everlog/dom/value/hatena.rb', line 13
def issued
row_string = maybe(@response['issued']).to_s
DateTime.parse(row_string).to_time
rescue ArgumentError
Time.parse('00:00:00')
end
|
#link ⇒ Object
9
10
11
|
# File 'lib/everlog/dom/value/hatena.rb', line 9
def link
@response['link'].first['href']
end
|
#title ⇒ Object
5
6
7
|
# File 'lib/everlog/dom/value/hatena.rb', line 5
def title
maybe(@response['title']).to_s
end
|