Class: Nmg::Type::Machine
Class Method Summary collapse
Methods inherited from Base
Class Method Details
.generate(count, options = {}, gen = Random.new) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/nmg/type/machine.rb', line 6 def self.generate(count, = {}, gen = Random.new) maintenances_count = [:maintenances_count] count.times.map do new(maintenances: Maintenance.generate(maintenances_count, [:maintenances] || {}, gen)) end end |