lib/kanpachi/response.rb in kanpachi-0.0.2 vs lib/kanpachi/response.rb in kanpachi-0.0.3

- old
+ new

@@ -1,7 +1,7 @@ -require 'roar/representer' -require 'roar/representer/feature/hypermedia' +require 'roar/representer/json' +require 'roar/decorator' require 'representable/json/collection' require 'representable/json/hash' module Kanpachi class Response @@ -12,17 +12,17 @@ def initialize(name) @name = name @status = 200 @headers = {} - @representation = Module.new { include Representation } + @representation = Class.new(Roar::Decorator) { include Representation } end module Representation def self.included(base) base.class_eval do - include Roar::Representer - include Roar::Representer::Feature::Hypermedia + include Roar::Representer::JSON + include Roar::Decorator::HypermediaConsumer def self.example example = Hash.new self.properties.each do |key, value| if value[:hash]