Class: Google::CustomSearch::XML::Result
- Inherits:
-
Object
- Object
- Google::CustomSearch::XML::Result
- Defined in:
- lib/google/custom_search/xml/results.rb
Instance Method Summary collapse
- #content ⇒ Object
-
#initialize(node) ⇒ Result
constructor
A new instance of Result.
- #site ⇒ Object
- #title ⇒ Object
- #uri ⇒ Object
Constructor Details
#initialize(node) ⇒ Result
Returns a new instance of Result.
71 72 73 |
# File 'lib/google/custom_search/xml/results.rb', line 71 def initialize(node) @node = node end |
Instance Method Details
#content ⇒ Object
83 84 85 |
# File 'lib/google/custom_search/xml/results.rb', line 83 def content @node.search('S').text end |
#site ⇒ Object
87 88 89 |
# File 'lib/google/custom_search/xml/results.rb', line 87 def site URI.parse(@node.search('U').text).host end |
#title ⇒ Object
75 76 77 |
# File 'lib/google/custom_search/xml/results.rb', line 75 def title @node.search('T').text end |
#uri ⇒ Object
79 80 81 |
# File 'lib/google/custom_search/xml/results.rb', line 79 def uri @node.search('U').text end |