Sha256: 824cb05fbe8b6e14492781ee7aa67e7b01d21ab29444ffc4d6b5cff8fe210948

Contents?: true

Size: 349 Bytes

Versions: 2

Compression:

Stored size: 349 Bytes

Contents

module Faker
  module Food
    extend ModuleUtils
    extend self

    def ingredient
      self.send( %w(vegetable fruit meat herb_or_spice)[rand 4] )
    end

    def vegetable
      VEGETABLE.rand
    end

    def fruit
      FRUIT.rand
    end

    def meat
      MEAT.rand
    end

    def herb_or_spice
      HERB_SPICE.rand
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ffaker-1.30.0 lib/ffaker/food.rb
ffaker-1.25.0 lib/ffaker/food.rb