Class: Tjcrawler::Crawler::Result

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**params) ⇒ Result

Returns a new instance of Result.



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

def initialize(**params)
  params.each do |key, value|
    instance_variable_set("@#{key}", value) unless value.nil?
  end
end

Instance Attribute Details

#contentObject

Returns the value of attribute content.



4
5
6
# File 'lib/tjcrawler/crawler/result.rb', line 4

def content
  @content
end

Returns the value of attribute links.



4
5
6
# File 'lib/tjcrawler/crawler/result.rb', line 4

def links
  @links
end

#urlObject

Returns the value of attribute url.



4
5
6
# File 'lib/tjcrawler/crawler/result.rb', line 4

def url
  @url
end