Class: Webtractor::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/webtractor/result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title, xml) ⇒ Result

Returns a new instance of Result.



5
6
7
8
9
# File 'lib/webtractor/result.rb', line 5

def initialize title, xml
  @title = title
  @text = xml.text
  @xml = xml
end

Instance Attribute Details

#textObject

Returns the value of attribute text.



3
4
5
# File 'lib/webtractor/result.rb', line 3

def text
  @text
end

#titleObject

Returns the value of attribute title.



3
4
5
# File 'lib/webtractor/result.rb', line 3

def title
  @title
end

#xmlObject

Returns the value of attribute xml.



3
4
5
# File 'lib/webtractor/result.rb', line 3

def xml
  @xml
end