Class: Myimdb::Scraper::Base
Constant Summary
HandleExceptions::EXCEPTIONS_ENABLED
Class Method Summary
collapse
Instance Method Summary
collapse
#scraper_unescape_html, #strip_useless_chars
included
Class Method Details
.all ⇒ Object
71
72
73
|
# File 'lib/myimdb/scraper/base.rb', line 71
def self.all
['Freebase', 'Metacritic', 'RottenTomatoes', 'Imdb']
end
|
Instance Method Details
#directors ⇒ Object
42
|
# File 'lib/myimdb/scraper/base.rb', line 42
def directors; end
|
#directors_with_url ⇒ Object
43
|
# File 'lib/myimdb/scraper/base.rb', line 43
def directors_with_url; end
|
#genres ⇒ Object
48
|
# File 'lib/myimdb/scraper/base.rb', line 48
def genres; end
|
#image ⇒ Object
53
|
# File 'lib/myimdb/scraper/base.rb', line 53
def image; end
|
#name ⇒ Object
41
|
# File 'lib/myimdb/scraper/base.rb', line 41
def name; end
|
#plot ⇒ Object
50
|
# File 'lib/myimdb/scraper/base.rb', line 50
def plot; end
|
#rating ⇒ Object
46
|
# File 'lib/myimdb/scraper/base.rb', line 46
def rating; end
|
#release_date ⇒ Object
52
|
# File 'lib/myimdb/scraper/base.rb', line 52
def release_date; end
|
#summary ⇒ Object
55
56
57
58
59
60
61
|
# File 'lib/myimdb/scraper/base.rb', line 55
def summary
[:directors, :writers, :rating, :votes, :genres, :tagline, :plot, :year, :release_date].collect do |meth|
data = send(meth)
data = data.join(", ") if Array === data
sprintf("%-15s : %s", meth.to_s.capitalize, data)
end.join("\n")
end
|
#tagline ⇒ Object
49
|
# File 'lib/myimdb/scraper/base.rb', line 49
def tagline; end
|
#to_hash ⇒ Object
63
64
65
66
67
68
69
|
# File 'lib/myimdb/scraper/base.rb', line 63
def to_hash
movie_as_hash = {}
[:directors, :writers, :rating, :votes, :genres, :tagline, :plot, :year, :release_date].each do |meth|
movie_as_hash[meth] = send(meth)
end
movie_as_hash
end
|
#votes ⇒ Object
47
|
# File 'lib/myimdb/scraper/base.rb', line 47
def votes; end
|
#writers ⇒ Object
44
|
# File 'lib/myimdb/scraper/base.rb', line 44
def writers; end
|
#writers_with_url ⇒ Object
45
|
# File 'lib/myimdb/scraper/base.rb', line 45
def writers_with_url; end
|
#year ⇒ Object
51
|
# File 'lib/myimdb/scraper/base.rb', line 51
def year; end
|