skoba / openehr-ruby

Ruby implementation of the openEHR specification
http://openehr.jp/projects/ref-impl-ruby/
Apache License 2.0
35 stars 12 forks source link

Change ontology.items hash key from symbol :text to string 'text'. #11

Closed lavrovdv closed 11 years ago

lavrovdv commented 11 years ago

Archetype#concept_name use item[:text], but adl parser return item hash with key 'text'.

skoba commented 11 years ago

Thank you for pull request. However, I was wandering which is better hash key, String 'text' or Symbol :text, much when I implemented ADL parser. For better performance, key should be symbol, but in some cases, key needs pattern matching by regular expression. I selected string type key, but which do you think better?

lavrovdv commented 11 years ago

I think better way in this case use String keys. The use of Symbols does not have so much effect on performance this case.

skoba commented 11 years ago

Thank you for your kind advise. Спасибо!