Sha256: db523bfe969295b7096644cf686e34f49450a39958b8b9dc77556abd411ce123

Contents?: true

Size: 419 Bytes

Versions: 25

Compression:

Stored size: 419 Bytes

Contents

module Lookbook
  module OutputHelper
    def markdown(text = nil, &block)
      Lookbook::Markdown.render(block ? capture(&block) : text)
    end

    def highlight(source, **opts)
      Lookbook::CodeFormatter.highlight(source, **opts)
    end

    def beautify(source, **opts)
      Lookbook::CodeFormatter.beautify(source, **opts)
    end

    def pretty_json(obj)
      JSON.pretty_generate(obj)
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
lookbook-1.2.1 app/helpers/lookbook/output_helper.rb
lookbook-1.2.0 app/helpers/lookbook/output_helper.rb
lookbook-1.1.1 app/helpers/lookbook/output_helper.rb
lookbook-1.1.0 app/helpers/lookbook/output_helper.rb
lookbook-1.0.8 app/helpers/lookbook/output_helper.rb
lookbook-1.0.7 app/helpers/lookbook/output_helper.rb
lookbook-1.0.6 app/helpers/lookbook/output_helper.rb
lookbook-1.0.5 app/helpers/lookbook/output_helper.rb
lookbook-1.0.4 app/helpers/lookbook/output_helper.rb
lookbook-1.0.3 app/helpers/lookbook/output_helper.rb
lookbook-1.0.2 app/helpers/lookbook/output_helper.rb
lookbook-1.0.1 app/helpers/lookbook/output_helper.rb
lookbook-1.0.0 app/helpers/lookbook/output_helper.rb
lookbook-1.0.0.rc.3 app/helpers/lookbook/output_helper.rb
lookbook-1.0.0.rc.2 app/helpers/lookbook/output_helper.rb
lookbook-1.0.0.rc.1 app/helpers/lookbook/output_helper.rb
lookbook-1.0.0.beta.8 app/helpers/lookbook/output_helper.rb
lookbook-1.0.0.beta.7 app/helpers/lookbook/output_helper.rb
lookbook-1.0.0.beta.6 app/helpers/lookbook/output_helper.rb
lookbook-1.0.0.beta.5 app/helpers/lookbook/output_helper.rb