Method: Top4R::Item#unmarshal_other_attrs

Defined in:
lib/top4r/model/item.rb

#unmarshal_other_attrsObject



78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# File 'lib/top4r/model/item.rb', line 78

def unmarshal_other_attrs
  @id = @num_iid
  if @location && @location.size > 0
    @location = Location.new(@location)
  else
    @location = nil
  end
  if @item_imgs && @item_imgs.size > 0
    @item_imgs.map {|img| ItemImg.new(img)}
  end
  # if @item_imgs.is_a?(Array) && @item_imgs.size > 0
  #         @item_imgs.map {|img| ItemImg.new(img)}
  #       else
  #         @item_imgs = []
  #       end
  #       if @prop_imgs.is_a?(Array) && @prop_imgs.size > 0
  #         @prop_imgs.map {|img| PropImg.new(img)}
  #       else
  #         @prop_imgs = []
  #       end
  
  self
end