Class: Nokaya::Movie
Instance Attribute Summary collapse
-
#ref_url ⇒ Object
readonly
Returns the value of attribute ref_url.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#year ⇒ Object
readonly
Returns the value of attribute year.
Attributes inherited from Basic
#args, #filenames, #name, #options, #path, #type, #urls
Instance Method Summary collapse
-
#initialize(args, options = {}) ⇒ Movie
constructor
A new instance of Movie.
Methods inherited from Basic
Constructor Details
#initialize(args, options = {}) ⇒ Movie
Returns a new instance of Movie.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/nokaya/movie.rb', line 10 def initialize args, = {} super(args, ) @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 |
Instance Attribute Details
#ref_url ⇒ Object (readonly)
Returns the value of attribute ref_url.
8 9 10 |
# File 'lib/nokaya/movie.rb', line 8 def ref_url @ref_url end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
8 9 10 |
# File 'lib/nokaya/movie.rb', line 8 def title @title end |
#year ⇒ Object (readonly)
Returns the value of attribute year.
8 9 10 |
# File 'lib/nokaya/movie.rb', line 8 def year @year end |