Class: Google::Search::Item::Blog

Inherits:
Google::Search::Item show all
Defined in:
lib/google-search/item/blog.rb

Instance Attribute Summary collapse

Attributes inherited from Google::Search::Item

#content, #index, #thumbnail_height, #thumbnail_uri, #thumbnail_width, #title, #uri, #visible_uri

Instance Method Summary collapse

Methods inherited from Google::Search::Item

class_for

Constructor Details

#initialize(hash) ⇒ Blog

Initialize with hash.



25
26
27
28
29
30
# File 'lib/google-search/item/blog.rb', line 25

def initialize hash
  super
  @author = hash['author']
  @blog_uri = hash['blogUrl']
  @published = DateTime.parse hash['publishedDate']
end

Instance Attribute Details

#authorObject (readonly)

Author name.



15
16
17
# File 'lib/google-search/item/blog.rb', line 15

def author
  @author
end

#blog_uriObject (readonly)

Blog base uri.



10
11
12
# File 'lib/google-search/item/blog.rb', line 10

def blog_uri
  @blog_uri
end

#publishedObject (readonly)

Published DateTime.



20
21
22
# File 'lib/google-search/item/blog.rb', line 20

def published
  @published
end