Sha256: b22f5230eeb4e3f700ae2a518b1bfd79266165bec9ad0603daafd435472d76d9
Contents?: true
Size: 507 Bytes
Versions: 62
Compression:
Stored size: 507 Bytes
Contents
module Workarea module Storefront class ProductViewModel class Option attr_reader :product, :slug, :selections, :options def initialize(product, slug, selections, options = {}) @product = product @slug = slug.optionize @selections = selections @options = options end def name slug.titleize end def current options[slug].presence_in(selections) end end end end end
Version data entries
62 entries across 62 versions & 1 rubygems