class VCWineList

Public Class Methods

new(deets) click to toggle source
Calls superclass method VinoChipperModel::new
# File lib/models/vcwinelist.rb, line 7
def initialize(deets)
  super
  self.winery    = VCWinery.new(winery)
  self.wines     = wines.map { |wine| VCWine.new(wine) }
  self.ships_to  = ships_to.map { |state| VCState.new(state) }
end

Public Instance Methods

to_s() click to toggle source
# File lib/models/vcwinelist.rb, line 14
  def to_s
    "Winery: #{winery}

Wines: #{wines.map { |wine| wine & :to_s }}

Promotions: #{promotions}

Ships_to: #{ships_to.map { |state| state & :to_s }}

Special_Shipping: #{special_shipping}"
  end