def _set_batch_volume(self, value): if type(value) == type(int()) or type(value) == type(float()): value = Measure("%s gal" % value) else: value = Measure(value) self.batch_volume_units = value.unit self._SO_set_batch_volume(value.count)
def _set_tertiary_fermentation_length(self, value): if type(value) == type(int()) or type(value) == type(float()): value = Measure("%s days" % value) else: value = Measure(value) self.fermentation_stage_3_length = int(value.count) self.fermentation_stage_3_length_units = value.unit
def _set_tertiary_fermentation_temp(self, value): if type(value) == type(int()) or type(value) == type(float()): value = Measure("%s C" % value) else: value = Measure(value) self.fermentation_stage_3_temp_units = value.unit self.fermentation_stage_3_temp = value.count
def _set_carbonation_used(self, value): if type(value) == type(int()) or type(value) == type(float()): value = Measure("%s oz" % value) else: value = Measure(value) self.carbonation_amount = value.count self.carbonation_amount_units = value.unit
def _set_amount(self, value): if type(value) == type(int()): value = Measure("%s oz" % value) self.amount_units = value.unit self._SO_set_amount(value.count)
def _get_amount_m(self): return Measure( "%s %s" % (self._SO_get_amount(), Measure.measures[self.amount_units]))
def _get_time_used_m(self): return Measure("%s %s" % (self._SO_get_time_used(), Measure.timing_parts[self.time_used_units]))
def _set_time_used(self, value): if type(value) == type(int()): value = Measure("%s min" % value) self.time_used_units = value.unit self._SO_set_time_used(value.count)
def _get_batch_volume_m(self): return Measure( '%s %s' % (self.batch_volume, Measure.measures[self.batch_volume_units]))
def _get_tertiary_fermentation_length(self): return Measure( '%s %s' % (self.fermentation_stage_3_length, Measure.timing_parts[self.fermentation_stage_3_length_units]))
def _get_tertiary_fermentation_temp(self): return Measure( '%s %s' % (self.fermentation_stage_3_temp, Measure.temperatures[self.fermentation_stage_3_temp_units]))