Class: BeerRecipe::YeastWrapper

Inherits:
Wrapper
  • Object
show all
Defined in:
lib/beer_recipe/yeast_wrapper.rb

Instance Method Summary collapse

Methods inherited from Wrapper

#blank?, #format_method, #initialize, #method_missing, #respond_to_missing?, set, wrap

Constructor Details

This class inherits a constructor from BeerRecipe::Wrapper

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class BeerRecipe::Wrapper

Instance Method Details

#formatted_attenuationObject



2
3
4
5
# File 'lib/beer_recipe/yeast_wrapper.rb', line 2

def formatted_attenuation
  return "" if blank?(attenuation)
 "#{'%.0f' % attenuation}%"
end

#formatted_temperaturesObject



7
8
9
10
# File 'lib/beer_recipe/yeast_wrapper.rb', line 7

def formatted_temperatures
  return "" if blank?(min_temperature) || blank?(max_temperature)
  "#{'%.0f' % min_temperature}°C - #{'%.0f' % max_temperature}°C"
end