class Array
Some extentions to the core Array
class
Constants
- DEFAULT_GENERATIVE_TYPES
Public Class Methods
generate(min: 0, max: 30, type: nil)
click to toggle source
Randomly generate an Array
# File lib/ext_core.rb, line 105 def self.generate(min: 0, max: 30, type: nil) (0..Faker::Number.between(min, max)).map do if type.nil? DEFAULT_GENERATIVE_TYPES.sample.generate else type.generate end end end