Class: Cinch::Plugins::IMDb
- Inherits:
-
Object
- Object
- Cinch::Plugins::IMDb
- Includes:
- Cinch::Plugin
- Defined in:
- lib/cinch/plugins/imdb.rb
Instance Method Summary collapse
- #execute(m, title) ⇒ Object
-
#initialize(*args) ⇒ IMDb
constructor
A new instance of IMDb.
Constructor Details
#initialize(*args) ⇒ IMDb
Returns a new instance of IMDb.
8 9 10 11 12 13 |
# File 'lib/cinch/plugins/imdb.rb', line 8 def initialize(*args) super @imdb = FilmBuff::IMDb.new @imdb.locale = config[:locale] if config[:locale] end |
Instance Method Details
#execute(m, title) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/cinch/plugins/imdb.rb', line 16 def execute(m, title) movie = @imdb.find_by_title(title) m.reply "#{movie.title} - #{movie.}/10 - " << "http://www.imdb.com/title/#{movie.imdb_id}" end |