class Faker::Commerce

Public Instance Methods

color() click to toggle source
# File lib/faker/commerce.rb, line 5
def color
  fetch('commerce.color')
end
department() click to toggle source
# File lib/faker/commerce.rb, line 9
def department
  fetch('commerce.department')
end
price() click to toggle source
# File lib/faker/commerce.rb, line 17
def price
  random = Random.new
  (random.rand(0..100.0) * 100).floor/100.0
end
product_name() click to toggle source
# File lib/faker/commerce.rb, line 13
def product_name
  fetch('commerce.product_name.adjective') + ' ' + fetch('commerce.product_name.material') + ' ' + fetch('commerce.product_name.product')
end