Class: Workarea::Storefront::WishListItemViewModel

Inherits:
ApplicationViewModel
  • Object
show all
Defined in:
app/view_models/workarea/storefront/wish_list_item_view_model.rb

Instance Method Summary collapse

Instance Method Details

#customized?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'app/view_models/workarea/storefront/wish_list_item_view_model.rb', line 15

def customized?
  customizations.present?
end

#inventory_statusObject



19
20
21
# File 'app/view_models/workarea/storefront/wish_list_item_view_model.rb', line 19

def inventory_status
  InventoryStatusViewModel.new(inventory).message
end

#productObject



6
7
8
9
10
11
12
13
# File 'app/view_models/workarea/storefront/wish_list_item_view_model.rb', line 6

def product
  @product ||= ProductViewModel.wrap(
    product_model,
    sku: sku,
    pricing: options[:pricing],
    inventory: options[:inventory_collection]
  )
end