Class: Blekko::SearchResult
- Inherits:
-
Object
- Object
- Blekko::SearchResult
- Defined in:
- lib/blekko-search/search_result.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
Returns the value of attribute address.
-
#display_url ⇒ Object
Returns the value of attribute display_url.
-
#doc_date_iso ⇒ Object
Returns the value of attribute doc_date_iso.
-
#geocluster ⇒ Object
Returns the value of attribute geocluster.
-
#is_robots_banned ⇒ Object
Returns the value of attribute is_robots_banned.
-
#lat ⇒ Object
Returns the value of attribute lat.
-
#lon ⇒ Object
Returns the value of attribute lon.
-
#n_group ⇒ Object
(also: #sequence)
Returns the value of attribute n_group.
-
#phone ⇒ Object
Returns the value of attribute phone.
-
#rss ⇒ Object
Returns the value of attribute rss.
-
#rss_title ⇒ Object
Returns the value of attribute rss_title.
-
#short_host ⇒ Object
Returns the value of attribute short_host.
-
#short_host_url ⇒ Object
Returns the value of attribute short_host_url.
-
#snippet ⇒ Object
(also: #abstract)
Returns the value of attribute snippet.
-
#toplevel ⇒ Object
Returns the value of attribute toplevel.
-
#url ⇒ Object
Returns the value of attribute url.
-
#url_title ⇒ Object
Returns the value of attribute url_title.
-
#zip ⇒ Object
Returns the value of attribute zip.
Instance Method Summary collapse
- #datetime ⇒ Object
-
#initialize(result) ⇒ SearchResult
constructor
A new instance of SearchResult.
Constructor Details
#initialize(result) ⇒ SearchResult
Returns a new instance of SearchResult.
7 8 9 10 11 |
# File 'lib/blekko-search/search_result.rb', line 7 def initialize(result) result.each do |key, value| send("#{key}=", value) if respond_to? "#{key}=" end end |
Instance Attribute Details
#address ⇒ Object
Returns the value of attribute address.
3 4 5 |
# File 'lib/blekko-search/search_result.rb', line 3 def address @address end |
#display_url ⇒ Object
Returns the value of attribute display_url.
3 4 5 |
# File 'lib/blekko-search/search_result.rb', line 3 def display_url @display_url end |
#doc_date_iso ⇒ Object
Returns the value of attribute doc_date_iso.
3 4 5 |
# File 'lib/blekko-search/search_result.rb', line 3 def doc_date_iso @doc_date_iso end |
#geocluster ⇒ Object
Returns the value of attribute geocluster.
3 4 5 |
# File 'lib/blekko-search/search_result.rb', line 3 def geocluster @geocluster end |
#is_robots_banned ⇒ Object
Returns the value of attribute is_robots_banned.
3 4 5 |
# File 'lib/blekko-search/search_result.rb', line 3 def is_robots_banned @is_robots_banned end |
#lat ⇒ Object
Returns the value of attribute lat.
3 4 5 |
# File 'lib/blekko-search/search_result.rb', line 3 def lat @lat end |
#lon ⇒ Object
Returns the value of attribute lon.
3 4 5 |
# File 'lib/blekko-search/search_result.rb', line 3 def lon @lon end |
#n_group ⇒ Object Also known as: sequence
Returns the value of attribute n_group.
3 4 5 |
# File 'lib/blekko-search/search_result.rb', line 3 def n_group @n_group end |
#phone ⇒ Object
Returns the value of attribute phone.
3 4 5 |
# File 'lib/blekko-search/search_result.rb', line 3 def phone @phone end |
#rss ⇒ Object
Returns the value of attribute rss.
3 4 5 |
# File 'lib/blekko-search/search_result.rb', line 3 def rss @rss end |
#rss_title ⇒ Object
Returns the value of attribute rss_title.
3 4 5 |
# File 'lib/blekko-search/search_result.rb', line 3 def rss_title @rss_title end |
#short_host ⇒ Object
Returns the value of attribute short_host.
3 4 5 |
# File 'lib/blekko-search/search_result.rb', line 3 def short_host @short_host end |
#short_host_url ⇒ Object
Returns the value of attribute short_host_url.
3 4 5 |
# File 'lib/blekko-search/search_result.rb', line 3 def short_host_url @short_host_url end |
#snippet ⇒ Object Also known as: abstract
Returns the value of attribute snippet.
3 4 5 |
# File 'lib/blekko-search/search_result.rb', line 3 def snippet @snippet end |
#toplevel ⇒ Object
Returns the value of attribute toplevel.
3 4 5 |
# File 'lib/blekko-search/search_result.rb', line 3 def toplevel @toplevel end |
#url ⇒ Object
Returns the value of attribute url.
3 4 5 |
# File 'lib/blekko-search/search_result.rb', line 3 def url @url end |
#url_title ⇒ Object
Returns the value of attribute url_title.
3 4 5 |
# File 'lib/blekko-search/search_result.rb', line 3 def url_title @url_title end |
#zip ⇒ Object
Returns the value of attribute zip.
3 4 5 |
# File 'lib/blekko-search/search_result.rb', line 3 def zip @zip end |
Instance Method Details
#datetime ⇒ Object
13 14 15 |
# File 'lib/blekko-search/search_result.rb', line 13 def datetime DateTime.parse(doc_date_iso) if doc_date_iso end |