lib/unleash/feature_toggle.rb in unleash-0.1.3 vs lib/unleash/feature_toggle.rb in unleash-0.1.4

- old
+ new

@@ -20,11 +20,11 @@ "<FeatureToggle: name=#{self.name},enabled=#{self.enabled},choices=#{self.choices},strategies=#{self.strategies}>" end def is_enabled?(context, default_result) if not ['NilClass', 'Unleash::Context'].include? context.class.name - Unleash.logger.error "Provided context is not of the correct type #{context.class.name}, please use Unleash::Context" + Unleash.logger.error "Provided context is not of the correct type #{context.class.name}, please use Unleash::Context. Context set to nil." context = nil end result = self.enabled && self.strategies.select{ |s| strategy = Unleash::STRATEGIES.fetch(s.name.to_sym, :unknown) @@ -41,6 +41,6 @@ return result end end -end \ No newline at end of file +end