Class: Popularity::RedditResult
Instance Attribute Summary
Attributes inherited from Crawler
#url
Instance Method Summary
collapse
Methods inherited from RedditPost
#comments, #name, #score
Methods inherited from Crawler
#as_json, #async_done?, #host, #name, property_names, #request_url, #response, #response_json, stats, #total
Constructor Details
Returns a new instance of RedditResult.
45
46
47
48
49
50
51
|
# File 'lib/popularity/networks/reddit_post.rb', line 45
def initialize(url, r)
super(url)
@url = url
@response = r
self
end
|
Instance Method Details
#fetch ⇒ Object
65
66
67
|
# File 'lib/popularity/networks/reddit_post.rb', line 65
def fetch
false
end
|
#fetch_async ⇒ Object
69
70
71
|
# File 'lib/popularity/networks/reddit_post.rb', line 69
def fetch_async
false
end
|
#has_response? ⇒ Boolean
53
54
55
|
# File 'lib/popularity/networks/reddit_post.rb', line 53
def has_response?
true
end
|
#reddit_url ⇒ Object
57
58
59
|
# File 'lib/popularity/networks/reddit_post.rb', line 57
def reddit_url
@url
end
|
#valid? ⇒ Boolean
61
62
63
|
# File 'lib/popularity/networks/reddit_post.rb', line 61
def valid?
URI.parse(@url).host
end
|