salesking/json_schema_tools — pull request #5 by anicholson (2013-06-27 01:36:53+00:00)
Title: has_schema_attributes should accept schema from Ruby hash

Currently, the only way to add schema attributes to a class is from a static file-based definition.

Now that #3 has been merged, we should be able to do this using dynamic schemas too:

```ruby
class Example
include SchemaTools::Modules::Attributes

has_schema_attrs :example, :schema => { ... }
end
```
Useful, because my app returns documents from an API, along with the schema used to validate it. I want to be able to maintain as much interface-compatibility as possible :)