1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-30 19:52:20 +01:00
fab-manager/app/services/product_service.rb
2022-08-04 14:02:19 +02:00

21 lines
332 B
Ruby

# frozen_string_literal: true
# Provides methods for Product
class ProductService
def self.list
Product.all
end
# amount params multiplied by hundred
def self.amount_multiplied_by_hundred(amount)
if amount.present?
v = amount.to_f
return nil if v.zero?
return v * 100
end
nil
end
end