Class: MovieDB::Movie
- Includes:
- Celluloid, DataAnalysis::Statistics, Relation::QueryMethods
- Defined in:
- lib/movieDB.rb
Overview
Create a new movie record. The values are stored in the key-value data store.
Default values are supplement during the instantiation of the class. Those values are overridden when you provide one.
You can use it like this:
movie = Movie.new()
movie.title = "When Sally Met Harry"
You can raise a MovieError like this:
Instance Method Summary collapse
Methods included from DataAnalysis::Statistics
Methods included from Relation::QueryMethods
#fetch, #fetch_data, #imdb_tmdb_lookup, #movie_exists?, #mset, #query_imdb, #query_tmdb, #store_data
Methods included from Secret
Instance Method Details
#ids_to_array(ids) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/movieDB.rb', line 25 def ids_to_array(ids) arr ||= [] if ids.is_a? String arr << ids end if ids.is_a? Numeric arr << ids.to_s end if ids.is_a? Array ids.each do |n| arr << n end end return arr.flatten end |