jch/html-pipeline — pull request #22 by benubois (2012-11-29 07:50:45+00:00)
Title: Context validation

Here's my take on validating required context.

The method for declaring if a filter has required context looks like:

```ruby
module HTML
class Pipeline
class CamoFilter < Filter
validates_context_presence :asset_proxy, :asset_proxy_secret_key

def call
#...
end
end
end
end
```

If both required contexts were missing for this filter you would get an `ArgumentError` with the message **Missing context :asset_proxy for HTML::Pipeline::CamoFilter. Missing context :asset_proxy_secret_key for HTML::Pipeline::CamoFilter.**

Let me know what you think.

Thanks,

Ben