require 'coderay' require 'json' require 'docs/example/helper' module Docs class ERBEnvironment attr_writer :examples attr_accessor :content attr_accessor :config # <%= config.api_endpoint %> include ExampleHelper def pretty_print_json(json) begin JSON.pretty_generate(JSON.parse(json)) rescue JSON::ParserError => e e.inspect end end def syntax_highlight(str, language) CodeRay.scan(str, language).div end def get_binding binding end end end