wrx02 said almost 4 years ago on SOLID - Open/Closed Principle :
Great video. I can call `DocxDocumentParser` by `Document.new( 'some_path', 'DocxDocumentParser').parse` ? Line 4 in Document initialize, does `parser` needs `constantize` ?

stuarteaston said almost 4 years ago on SOLID - Open/Closed Principle :
Not tried this myself but I think you need to remove the quotes DocxDocumentParser so you don't pass in a string. You should pass in a class so that the initialize method on Document can call #new on it.

driftingruby said over 3 years ago on SOLID - Open/Closed Principle :
Great videos... One question... should the line 12 be "class BaseDocumentParser" instead of a "def BaseDocumentParser"?

Login to Comment