diff --git a/README.md b/README.md index c7717b7..e1992c6 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,7 @@ See `kitchen_sink.sh` examples. # Current Status + - [ ] CLI is wrapping `FILE.` and `FEED.` multihahshes in "string quotes". Why? - [ ] Update Dev docs in protocol spec to reflect changes to `lipmaa` header. - [ ] Update spec document CLI usage examples to reflect API changes in 2020. - [ ] 100% class / module documentation diff --git a/lib/pigeon/draft.rb b/lib/pigeon/draft.rb index 2f3d4af..8a00982 100644 --- a/lib/pigeon/draft.rb +++ b/lib/pigeon/draft.rb @@ -22,12 +22,11 @@ module Pigeon def []=(key, value) raise STRING_KEYS_ONLY unless key.is_a?(String) - case value[0..4] - when BLOB_SIGIL, MESSAGE_SIGIL, IDENTITY_SIGIL, STRING_SIGIL + when BLOB_SIGIL, MESSAGE_SIGIL, IDENTITY_SIGIL body[key] = value else - body[key] = value.inspect + body[key] = value.start_with?(STRING_SIGIL) ? value : value.inspect end end