diff options
author | mh <mh@immerda.ch> | 2011-08-05 14:12:09 +0200 |
---|---|---|
committer | mh <mh@immerda.ch> | 2011-08-05 14:12:09 +0200 |
commit | 1d5f20953d6a4bf6de8dab1d915b4d252eb4a790 (patch) | |
tree | 9bd9af33ff661d7c4bff1647998dc956af55a06d /lib | |
parent | 3565f7550a1d604ed248ad0174af6cccd59f8131 (diff) |
cleanup code and improve test naming
Diffstat (limited to 'lib')
-rw-r--r-- | lib/trocla.rb | 6 |
1 files changed, 3 insertions, 3 deletions
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 |