Sha256: 5797265da123c1cde3ce6d39657b27844cc43ca4a50b5fc3b125b35c2d9a5264

Contents?: true

Size: 340 Bytes

Versions: 10

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

10 entries across 10 versions & 1 rubygems

Version Path
alephant-renderer-2.0.0 lib/alephant/renderer/views/json.rb
alephant-renderer-1.0.5 lib/alephant/renderer/views/json.rb
alephant-renderer-1.0.4 lib/alephant/renderer/views/json.rb
alephant-renderer-1.0.3 lib/alephant/renderer/views/json.rb
alephant-renderer-1.0.2 lib/alephant/renderer/views/json.rb
alephant-renderer-1.0.1 lib/alephant/renderer/views/json.rb
alephant-renderer-1.0.0 lib/alephant/renderer/views/json.rb
alephant-renderer-0.3.0 lib/alephant/renderer/views/json.rb
alephant-renderer-0.2.0 lib/alephant/renderer/views/json.rb
alephant-renderer-0.1.0 lib/alephant/renderer/views/json.rb