orhantoy / edifunct

Fun with EDIFACT :tada:
MIT License
3 stars 2 forks source link

Fixes/add support to symboles in schema #1

Closed ghost closed 5 years ago

ghost commented 5 years ago

For now, only String keys are accepted in the schema file. Because we only fetch using String keys.

Actually the schema example given does not work if you manually write it as a ruby object ( the keys get converted to symbols) But because in the tests file you use JSON parser, it acts different by converting keys to strings instead of symbols.

My suggestion is to unify the hash whatever was the user input.

It is important Because the Hash#fetch method complains about missing keys by throwing exceptions and is String/Symbol sensitive.

ghost commented 5 years ago

After a discussion about this : Supporting Symbols is out of this gem scope. 👍