mdsol/crichton — pull request #251 by brutski (2014-08-27 15:06:37+00:00)
Title: Integrate representors initial

@fosrias @sheavalentine-mdsol @miwest929 @HonoreDB

DO NOT MERGE YET.

This PR is not mergeable yet. (should be merged after #250 )
It includes initial RepresentorSerializer. Not everything is done correctly with regard to embedded items.

For embedded item, when called `embedded.to_representor(options)`, it then tries to call `to_media_type` on representor object, which is not what I would expect. I would expect to build representor object for entire target object and then call `to_media_type` on it. It means that I have to re-work media_type.rb a little bit.

```ruby
#representor_serializer.rb
def get_embedded_data(options)
object.each_embedded_semantic(options).map do |semantic|
embedded_representor = semantic.value.map { |embedded| embedded.to_representor(options) }
{ semantic.name => embedded_representor }
end
end

#media_type.rb
serializer = Crichton::Representor::RepresentorSerializer.new(self, options)
representor = serializer.to_representor(options)
representor.to_media_type(media_type, options)
```