lib/movie_helper/movie.rb in movie_helper-0.1.0 vs lib/movie_helper/movie.rb in movie_helper-0.2.0

- old
+ new

@@ -1,7 +1,7 @@ class MovieHelper::Movie - attr_accessor :title, :year, :watch_with, :watch_when, :genre, :review, :stars, :rating, :language, :url, :is_latest, :is_best + attr_accessor :title, :year, :summary, :genre, :mood, :actors, :director, :language, :language, :url, :is_netflix, :is_amazon, :is_elsewhere @@all = [] def initialize(movie_hash) movie_hash.each {|key, value| self.send(("#{key}="), value)} @@ -16,15 +16,19 @@ def self.all @@all end - def self.best_films - @@all.select {|movie| movie.is_best == true} + def self.latest_netflix + @@all.select {|movie| movie.is_netflix == true} end - def self.latest - @@all.select {|movie| movie.is_latest == true} + def self.latest_amazon + @@all.select {|movie| movie.is_amazon == true} + end + + def self.latest_elsewhere + @@all.select {|movie| movie.is_elsewhere == true} end end