Class: IMDB::Data::Show
- Inherits:
-
Object
- Object
- IMDB::Data::Show
- Includes:
- HTTParty
- Defined in:
- lib/imdb-html/data/show.rb
Class Method Summary collapse
Instance Method Summary collapse
- #episodes ⇒ Object
- #http(*args) ⇒ Object
-
#initialize(tt) ⇒ Show
constructor
A new instance of Show.
- #json_path ⇒ Object
- #noko(*args) ⇒ Object
- #path(*args) ⇒ Object
- #tt ⇒ Object
Constructor Details
#initialize(tt) ⇒ Show
Returns a new instance of Show.
8 9 10 |
# File 'lib/imdb-html/data/show.rb', line 8 def initialize tt @tt = tt.to_i end |
Class Method Details
Instance Method Details
#episodes ⇒ Object
26 27 28 |
# File 'lib/imdb-html/data/show.rb', line 26 def episodes Episode.parse_params( noko "epcast" ) end |
#http(*args) ⇒ Object
18 19 20 |
# File 'lib/imdb-html/data/show.rb', line 18 def http *args self.class.get path *args end |
#json_path ⇒ Object
30 31 32 |
# File 'lib/imdb-html/data/show.rb', line 30 def json_path File.join "/home/mdt/g/imdb-memo/json/#{tt}.json" end |
#noko(*args) ⇒ Object
21 22 23 |
# File 'lib/imdb-html/data/show.rb', line 21 def noko *args Nokogiri::HTML http *args end |
#path(*args) ⇒ Object
15 16 17 |
# File 'lib/imdb-html/data/show.rb', line 15 def path *args File.join *["/title/tt#{tt}", args].flatten end |
#tt ⇒ Object
12 13 14 |
# File 'lib/imdb-html/data/show.rb', line 12 def tt @tt.to_s.rjust 7, '0' end |