Class: Google::Search::Item::News
- Inherits:
-
Google::Search::Item
- Object
- Google::Search::Item
- Google::Search::Item::News
- Defined in:
- lib/google-search/item/news.rb
Instance Attribute Summary collapse
-
#language ⇒ Object
readonly
Language.
-
#location ⇒ Object
readonly
Location.
-
#published ⇒ Object
readonly
Published DateTime.
-
#publisher ⇒ Object
readonly
Publisher.
-
#redirect_uri ⇒ Object
readonly
Redirect uri.
Attributes inherited from Google::Search::Item
#content, #index, #thumbnail_height, #thumbnail_uri, #thumbnail_width, #title, #uri, #visible_uri
Instance Method Summary collapse
-
#initialize(hash) ⇒ News
constructor
Initialize with hash.
Methods inherited from Google::Search::Item
Constructor Details
#initialize(hash) ⇒ News
Initialize with hash.
35 36 37 38 39 40 41 42 |
# File 'lib/google-search/item/news.rb', line 35 def initialize hash super @location = hash['location'] @published = DateTime.parse hash['publishedDate'] @language = hash['language'] @publisher = hash['publisher'] @redirect_uri = hash['signedRedirectUrl'] end |
Instance Attribute Details
#language ⇒ Object (readonly)
Language.
25 26 27 |
# File 'lib/google-search/item/news.rb', line 25 def language @language end |
#location ⇒ Object (readonly)
Location.
20 21 22 |
# File 'lib/google-search/item/news.rb', line 20 def location @location end |
#published ⇒ Object (readonly)
Published DateTime.
10 11 12 |
# File 'lib/google-search/item/news.rb', line 10 def published @published end |
#publisher ⇒ Object (readonly)
Publisher.
15 16 17 |
# File 'lib/google-search/item/news.rb', line 15 def publisher @publisher end |
#redirect_uri ⇒ Object (readonly)
Redirect uri.
30 31 32 |
# File 'lib/google-search/item/news.rb', line 30 def redirect_uri @redirect_uri end |