moss

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 2983dbf31816a63cb0ee1815ebe8f20be2455018
parent 52fa9f2913cf83ecc5a51f9d922747d6f42e3329
Author: Daniel Barlow <dan@telent.net>
Date:   Fri, 13 Aug 2021 00:03:15 +0100

replace ternary with ||

also use English

Diffstat:
Mmoss.rb | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/moss.rb b/moss.rb @@ -1,4 +1,5 @@ #!/usr/bin/env ruby +require 'English' require "pathname" require "tempfile" require "json" @@ -187,7 +188,7 @@ class CLI flags = argv.reduce({}) {|m, flag| key, val= flag.match(/\A--(\w+)(?:=(.+))?/)&.captures key ? - m.merge(key.to_sym => val ? val : :key_present) : + m.merge(key.to_sym => (val || :key_present)) : m }