Class: Google::Search::Item::Blog
- Inherits:
-
Google::Search::Item
- Object
- Google::Search::Item
- Google::Search::Item::Blog
- Defined in:
- lib/google-search/item/blog.rb
Instance Attribute Summary collapse
-
#author ⇒ Object
readonly
Author name.
-
#blog_uri ⇒ Object
readonly
Blog base uri.
-
#published ⇒ Object
readonly
Published DateTime.
Attributes inherited from Google::Search::Item
#content, #index, #thumbnail_height, #thumbnail_uri, #thumbnail_width, #title, #uri, #visible_uri
Instance Method Summary collapse
-
#initialize(hash) ⇒ Blog
constructor
Initialize with hash.
Methods inherited from Google::Search::Item
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
#author ⇒ Object (readonly)
Author name.
15 16 17 |
# File 'lib/google-search/item/blog.rb', line 15 def @author end |
#blog_uri ⇒ Object (readonly)
Blog base uri.
10 11 12 |
# File 'lib/google-search/item/blog.rb', line 10 def blog_uri @blog_uri end |
#published ⇒ Object (readonly)
Published DateTime.
20 21 22 |
# File 'lib/google-search/item/blog.rb', line 20 def published @published end |