class Nokaya::Movie
Attributes
ref_url[R]
title[R]
year[R]
Public Class Methods
new(args, options = {})
click to toggle source
Calls superclass method
Nokaya::Basic::new
# File lib/nokaya/movie.rb, line 10 def initialize args, options = {} super(args, options) @type = :movie begin resp = Spotlite::Movie.find(@args.join(' ')) rescue SocketError Logs.rec.error 'No connexion' return nil end @options['alt'] ? res = resp[1] : res = resp[0] @title = res.title @ref_url = res.url @year = res.year @urls = [res.poster_url] @filenames = name_files() end
Private Instance Methods
name_files()
click to toggle source
# File lib/nokaya/movie.rb, line 29 def name_files @name ||= @workers.sanitize(@title) ["#{@type.to_s}-#{@name}.jpg"] end