Implements methods common to all JSON-based renderers. This class is not meant to be used directly, only as a parent to other type-specific rendering classes.
@attr object [Object] instance to be rendered @attr options [Hash] additional rendering options
@author Boris Parak <parak@cesnet.cz
Shortcuts to interesting object attributes, always prefixed with `object_`
Constructs a renderer instance for the given object.
@param object [Object] instance to be rendered @param options [Hash] additional options
# File lib/occi/core/renderers/json/base.rb, line 31 def initialize(object, options) @object = object @options = options end
Renders the given object to `JSON`.
@return [String] object rendering as JSON
# File lib/occi/core/renderers/json/base.rb, line 39 def render render_hash.to_json end