Class: Spree::Gallery::ProductGallery

Inherits:
Object
  • Object
show all
Defined in:
app/models/spree/gallery/product_gallery.rb

Instance Method Summary collapse

Constructor Details

#initialize(product) ⇒ ProductGallery

Returns a new instance of ProductGallery.



6
7
8
# File 'app/models/spree/gallery/product_gallery.rb', line 6

def initialize(product)
  @product = product
end

Instance Method Details

#imagesEnumerable<Spree::Image>

A list of all images associated with this gallery

Returns:



13
14
15
# File 'app/models/spree/gallery/product_gallery.rb', line 13

def images
  @images ||= @product.variant_images
end