From 1d5f20953d6a4bf6de8dab1d915b4d252eb4a790 Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 5 Aug 2011 14:12:09 +0200 Subject: cleanup code and improve test naming --- lib/trocla.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/trocla.rb b/lib/trocla.rb index fe7696c..96f14d1 100644 --- a/lib/trocla.rb +++ b/lib/trocla.rb @@ -49,8 +49,8 @@ class Trocla end end - def set_password(key,format,password,delete_plain=false) - if ((format=format) == 'plain') && !delete_plain + def set_password(key,format,password) + if (format == 'plain') h = (cache[key] = { 'plain' => password }) else h = (cache[key] = cache.fetch(key,{}).merge({ format => password })) @@ -88,4 +88,4 @@ class Trocla YAML.load(File.read(File.expand_path(File.join(File.dirname(__FILE__),'trocla','default_config.yaml')))) end -end \ No newline at end of file +end -- cgit v1.2.3