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, #file_name, #image_url, #options, #path, #type
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 |
# File 'lib/nokaya/movie.rb', line 10 def initialize args, = {} super(args, ) @type = :movie resp = Spotlite::Movie.find(@args.join(' ')) @options['alt'] ? res = resp[1] : res = resp[0] @title = res.title @ref_url = res.url @year = res.year @image_url = [res.poster_url] @file_name = [name()] 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 |