myimdb 0.4.5 → 0.4.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,6 @@
1
1
  class UnformattedHtml < Exception; end
2
2
  class DocumentNotFound < Exception; end
3
+ class ScraperNotFound < Exception; end
3
4
 
4
5
  module HandleExceptions
5
6
  def self.included(base)
@@ -53,7 +54,18 @@ module Myimdb
53
54
  sprintf("%-15s : %s", meth.to_s.capitalize, data)
54
55
  end.join("\n")
55
56
  end
57
+
58
+ def to_hash
59
+ movie_as_hash = {}
60
+ [:directors, :writers, :rating, :votes, :genres, :tagline, :plot, :year, :release_date].each do |meth|
61
+ movie_as_hash[meth] = send(meth)
62
+ end
63
+ movie_as_hash
64
+ end
56
65
 
66
+ def self.all
67
+ [Freebase, Metacritic, RottenTomatoes, Imdb]
68
+ end
57
69
  end
58
70
  end
59
71
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{myimdb}
8
- s.version = "0.4.5"
8
+ s.version = "0.4.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Gaurav"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: myimdb
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 3
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 5
10
- version: 0.4.5
9
+ - 6
10
+ version: 0.4.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Gaurav