Module: TheTvDb::Api::ImageListHelpers
- Defined in:
- lib/the_tv_db/api/image_list_helpers.rb
Instance Method Summary collapse
- #banners ⇒ Object
- #highest_pixel_count ⇒ Object
- #posters ⇒ Object
- #season_banners ⇒ Object
- #standard ⇒ Object
- #widescreen ⇒ Object
Instance Method Details
#banners ⇒ Object
18 19 20 21 22 23 |
# File 'lib/the_tv_db/api/image_list_helpers.rb', line 18 def r = select do |i| i.type == :fanart end r.extend(TheTvDb::Api::ImageListHelpers) end |
#highest_pixel_count ⇒ Object
4 5 6 |
# File 'lib/the_tv_db/api/image_list_helpers.rb', line 4 def highest_pixel_count sort { |a,b| a.pixels <=> b.pixels }.last end |
#posters ⇒ Object
24 25 26 27 28 29 |
# File 'lib/the_tv_db/api/image_list_helpers.rb', line 24 def posters r = select do |i| i.type == :poster end r.extend(TheTvDb::Api::ImageListHelpers) end |
#season_banners ⇒ Object
13 14 15 16 17 |
# File 'lib/the_tv_db/api/image_list_helpers.rb', line 13 def select do |i| i.type == :season end end |
#standard ⇒ Object
10 11 12 |
# File 'lib/the_tv_db/api/image_list_helpers.rb', line 10 def standard select { |i| not i.widescreen? } end |
#widescreen ⇒ Object
7 8 9 |
# File 'lib/the_tv_db/api/image_list_helpers.rb', line 7 def widescreen select { |i| i.widescreen? } end |