ActiveDocument Monologue

crichey edited this page Sep 14, 2010 · 2 revisions
Clone this wiki locally

This is an area where I will be creating a running, but open monologue on my thoughts while creating ActiveDocument. It will serve as a place for me to put lists of things I need to add a later time (but don’t yet warrant listing as “issues”), generally think about some more and it will provide a good place for people to check in to see the general status of where things are headed and to provide feedback.

Enough preamble….here we go!

Random Design Thoughts

  1. Right now all initial calls to a dynamic attribute provide a wildcarded xpath. That is, if book is an instance of a class that extends ActiveDocument::Base the call to book.chapter will find all chapter elements located anywhere in the book document. Should this be the default behavior? Should there be an option to indicate that you only want chapter elements that are children of the root book element?

Pondering the Implementation

  1. There seems to be a fair amount of duplicated code in the method_missing methods between Finder and Base. Is there a good way to reduce this duplication?