Sha256: fe26b5d568d8974ac129fd73c7328315027268d80c611d2376198dd7bab3bcaa

Contents?: true

Size: 340 Bytes

Versions: 4

Compression:

Stored size: 340 Bytes

Contents

require "alephant/renderer/views/base"
require "json"

module Alephant
  module Renderer
    module Views
      class Json
        include ::Alephant::Renderer::Views::Base

        def setup
          @content_type = "application/json"
        end

        def render
          ::JSON.generate to_h
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
alephant-renderer-3.0.0 lib/alephant/renderer/views/json.rb
alephant-renderer-2.0.3 lib/alephant/renderer/views/json.rb
alephant-renderer-2.0.2 lib/alephant/renderer/views/json.rb
alephant-renderer-2.0.1 lib/alephant/renderer/views/json.rb