class EfoNelfo::V40::VL
Public Instance Methods
gross_price()
click to toggle source
# File lib/efo_nelfo/v40/vl.rb, line 36 def gross_price gross_price? ? properties[:price].to_f : nil end
gross_price?()
click to toggle source
# File lib/efo_nelfo/v40/vl.rb, line 32 def gross_price? price_type.nil? || price_type == 'B' end
images()
click to toggle source
# File lib/efo_nelfo/v40/vl.rb, line 48 def images info.map(&:image).compact end
net_price()
click to toggle source
# File lib/efo_nelfo/v40/vl.rb, line 40 def net_price net_price? ? properties[:price].to_f : nil end
net_price?()
click to toggle source
# File lib/efo_nelfo/v40/vl.rb, line 44 def net_price? price_type == 'N' end
nrf_id()
click to toggle source
# File lib/efo_nelfo/v40/vl.rb, line 28 def nrf_id product_type == 4 ? product_number : nil end
urls()
click to toggle source
Returns array of urls extracted from VX
lines
# File lib/efo_nelfo/v40/vl.rb, line 59 def urls info.map(&:value).select { |u| u.match %r{\Ahttps?://} } end
Private Instance Methods
fetch_from_info(method)
click to toggle source
# File lib/efo_nelfo/v40/vl.rb, line 65 def fetch_from_info(method) vx = info.select(&"#{method}?".to_sym).compact.first vx && vx.send(method) end