Certain plugin config options are mandatory, but they are not properly documented or graciously handled if absent.
For example, the "path" option of Webhooks submodules is mandatory .. it should be documented as so, and could raise something like raise NotImplementedError, "error message" for the lack of these options.
I'm contemplating how I might be able to transparently implement a "config hash access layer" .. so that per-plugin I can define required keys (and later value constraints) for the config hash. That way, I could raise errors if the hash doesn't exist for all accesses to that hash key ..
It's a bit over me (I've only been programming Ruby for 2 weeks) .. so I was wondering if a more advanced Rubyist might see an implementation strategy that would be idiomatic
Preferably, it would not require a mod to Cinch framework.. but I'm open to the notion
Certain plugin config options are mandatory, but they are not properly documented or graciously handled if absent.
For example, the "path" option of Webhooks submodules is mandatory .. it should be documented as so, and could raise something like
raise NotImplementedError, "error message"
for the lack of these options.I'm contemplating how I might be able to transparently implement a "config hash access layer" .. so that per-plugin I can define required keys (and later value constraints) for the config hash. That way, I could raise errors if the hash doesn't exist for all accesses to that hash key ..
It's a bit over me (I've only been programming Ruby for 2 weeks) .. so I was wondering if a more advanced Rubyist might see an implementation strategy that would be idiomatic
Preferably, it would not require a mod to Cinch framework.. but I'm open to the notion