Factlink/pavlov — pull request #1 by marten (2013-01-13 11:39:53+00:00)
Title: Cleanup operation

As discussed with Mark on Friday night, here are some proposed changes to Operation that make it clearer. I've extracted everything from the initialize method.

I've made it so that forgetting to implement `authorized?` raises a NotImplementedError instead of claiming that it is simply never authorized. Both have the same effect, but the former is clearer about what's wrong.

I've also added attr_readers for all arguments given.

There are some things still that I would do different. For instance, I would do the authority check only before executing, not in the initializer, and definitely not before "finish_initialize".