Class: Topsy::LinkSearchResult

Inherits:
Object
  • Object
show all
Defined in:
lib/rtopsy/link_search_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ LinkSearchResult

Returns a new instance of LinkSearchResult.



26
27
28
29
30
# File 'lib/rtopsy/link_search_result.rb', line 26

def initialize(hash)
  hash.each do |key, value|
    instance_variable_set("@#{key}", value)
  end
end

Instance Attribute Details

#contentObject

Returns the value of attribute content.



20
21
22
# File 'lib/rtopsy/link_search_result.rb', line 20

def content
  @content
end

#highlightObject

Returns the value of attribute highlight.



20
21
22
# File 'lib/rtopsy/link_search_result.rb', line 20

def highlight
  @highlight
end

#hitsObject

Returns the value of attribute hits.



20
21
22
# File 'lib/rtopsy/link_search_result.rb', line 20

def hits
  @hits
end

#scoreObject

Returns the value of attribute score.



20
21
22
# File 'lib/rtopsy/link_search_result.rb', line 20

def score
  @score
end

#titleObject

Returns the value of attribute title.



20
21
22
# File 'lib/rtopsy/link_search_result.rb', line 20

def title
  @title
end

#topsy_trackback_urlObject

Returns the value of attribute topsy_trackback_url.



20
21
22
# File 'lib/rtopsy/link_search_result.rb', line 20

def topsy_trackback_url
  @topsy_trackback_url
end

Returns the value of attribute trackback_permalink.



20
21
22
# File 'lib/rtopsy/link_search_result.rb', line 20

def trackback_permalink
  @trackback_permalink
end

#trackback_totalObject

Returns the value of attribute trackback_total.



20
21
22
# File 'lib/rtopsy/link_search_result.rb', line 20

def trackback_total
  @trackback_total
end

#urlObject

Returns the value of attribute url.



20
21
22
# File 'lib/rtopsy/link_search_result.rb', line 20

def url
  @url
end

Instance Method Details

#to_sObject



22
23
24
# File 'lib/rtopsy/link_search_result.rb', line 22

def to_s
  "Topsy LinkSearchResult: #{url}, @#{title}, hits: #{hits}"
end