Sha256: a0c6e54825512175062f735ce41ee5c8e6d2ec806a88cbfdfdc4237b223b3a4a
Contents?: true
Size: 763 Bytes
Versions: 1
Compression:
Stored size: 763 Bytes
Contents
# Faker::Commerce ```ruby Faker::Commerce.color #=> "lavender" # Keyword arguments: max, fixed_amount Faker::Commerce.department #=> "Grocery, Health & Beauty" Faker::Commerce.department(max: 5) #=> "Grocery, Books, Health & Beauty" Faker::Commerce.department(max: 2, fixed_amount: true) #=> "Books & Tools" Faker::Commerce.material #=> "Plastic" Faker::Commerce.product_name #=> "Practical Granite Shirt" # Produces a Float by default # Keyword arguments: range, as_string Faker::Commerce.price #=> 44.6 Faker::Commerce.price(range: 0..10.0, as_string: true) #=> "2.18" # Generate a random promotion code. # Keyword arguments: digits Faker::Commerce.promotion_code #=> "AmazingDeal829102" Faker::Commerce.promotion_code(digits: 2) #=> "AmazingPrice57" ```
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
logstash-output-scalyr-0.1.7 | vendor/bundle/jruby/2.5.0/bundler/gems/faker-e1bd4a5a5777/doc/default/commerce.md |