Module: Roar::JSON

Defined in:
lib/roar/json.rb,
lib/roar/json/hal.rb,
lib/roar/json/json_api.rb

Defined Under Namespace

Modules: ClassMethods, HAL, InstanceMethods, JSONAPI Classes: HyperlinkDecorator

Constant Summary collapse

Hash =
Representable::JSON::Hash
Collection =
Representable::JSON::Collection

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object


7
8
9
10
11
12
13
14
15
# File 'lib/roar/json.rb', line 7

def self.included(base)
  base.class_eval do
    include Representer
    include Representable::JSON

    extend ClassMethods
    include InstanceMethods # otherwise Representable overrides our #to_json.
  end
end