lib/milk_maid/batch.rb in milk_maid-0.3.0 vs lib/milk_maid/batch.rb in milk_maid-0.4.0

- old
+ new

@@ -1,13 +1,11 @@ require 'securerandom' module MilkMaid class Batch - attr_accessor :name, :batch_guid, :temperature, :duration, :size, :notifier, :sensor + attr_accessor :name, :batch_guid, :temperature, :duration, :size, :notifier, :sensor, :nap_time - NAP_TIME = 5 - def initialize(options = {}) options.each { |key, value| send("#{key}=", value) } @batch_guid = generate_guid end @@ -45,9 +43,9 @@ def generate_guid ::SecureRandom.uuid end def take_a_nap - sleep NAP_TIME + sleep nap_time end end end