Class: Blekko::SearchResult

Inherits:
Object
  • Object
show all
Defined in:
lib/blekko-search/search_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#addressObject

Returns the value of attribute address.



3
4
5
# File 'lib/blekko-search/search_result.rb', line 3

def address
  @address
end

#display_urlObject

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_isoObject

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

#geoclusterObject

Returns the value of attribute geocluster.



3
4
5
# File 'lib/blekko-search/search_result.rb', line 3

def geocluster
  @geocluster
end

#is_robots_bannedObject

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

#latObject

Returns the value of attribute lat.



3
4
5
# File 'lib/blekko-search/search_result.rb', line 3

def lat
  @lat
end

#lonObject

Returns the value of attribute lon.



3
4
5
# File 'lib/blekko-search/search_result.rb', line 3

def lon
  @lon
end

#n_groupObject 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

#phoneObject

Returns the value of attribute phone.



3
4
5
# File 'lib/blekko-search/search_result.rb', line 3

def phone
  @phone
end

#rssObject

Returns the value of attribute rss.



3
4
5
# File 'lib/blekko-search/search_result.rb', line 3

def rss
  @rss
end

#rss_titleObject

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_hostObject

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_urlObject

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

#snippetObject 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

#toplevelObject

Returns the value of attribute toplevel.



3
4
5
# File 'lib/blekko-search/search_result.rb', line 3

def toplevel
  @toplevel
end

#urlObject

Returns the value of attribute url.



3
4
5
# File 'lib/blekko-search/search_result.rb', line 3

def url
  @url
end

#url_titleObject

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

#zipObject

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

#datetimeObject



13
14
15
# File 'lib/blekko-search/search_result.rb', line 13

def datetime
  DateTime.parse(doc_date_iso) if doc_date_iso
end