You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And imagine the frustration with creating such an object without any documentation. That's right -- the Glossarist gem has no documentation, and the specs do not even show any complete example.
I had the hardest time figuring out that this line doesn't work.
Glossarist::Concept.new(designations: [{designation: "xyz",type: "expression",normative_status: "preferred"}])# => works
The reason is the designation object must be using "string encoded" hashes, not symbol ones.
Glossarist::Concept.new(designations: [{"designation"=>"xyz","type"=>"expression","normative_status"=>"preferred"}])# => works
This is because of this code:
moduleGlossaristmoduleDesignationclassBase < Model# ...defself.from_h(hash)type=hash["type"]iftype.nil? || /\w/ !~ typeraiseArgumentError,"designation type is missing"end
This is not acceptable...
The text was updated successfully, but these errors were encountered:
This is the problem of a gem that is only being used by one developer -- only the same developer is familiar with the oddities of the gem, but no one knows how it actually works. All typical expectations, and the fear of other developers looking at the same code, are out the window.
This is not right. When we create a gem, it is expected to be USED BY OTHERs. This means we need proper code documentation, i.e. RDocs. At a minimum, provide a README on how to use the gem. Right now, none of that exists.
Today I was trying to create a Concept object.
And imagine the frustration with creating such an object without any documentation. That's right -- the Glossarist gem has no documentation, and the specs do not even show any complete example.
I had the hardest time figuring out that this line doesn't work.
The reason is the
designation
object must be using "string encoded" hashes, not symbol ones.This is because of this code:
This is not acceptable...
The text was updated successfully, but these errors were encountered: