Method: Vedeu::Renderers::JSON#content

Defined in:
lib/vedeu/renderers/json.rb

#contentString (private)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (String)


30
31
32
33
34
35
36
37
38
39
40
# File 'lib/vedeu/renderers/json.rb', line 30

def content
  if hash?(output)
    ::JSON.pretty_generate(output)

  else
    Vedeu.log(type:    :render,
              message: "#{self.class.name}#content: #{output.class.name}")

    ::JSON.pretty_generate(as_hash)
  end
end