awesome-print/awesome_print

View on GitHub
lib/awesome_print/formatters/simple_formatter.rb

Summary

Maintainability
A
0 mins
Test Coverage
require_relative 'base_formatter'

module AwesomePrint
  module Formatters
    class SimpleFormatter < BaseFormatter

      attr_reader :string, :type, :inspector, :options

      def initialize(string, type, inspector)
        @string = string
        @type = type
        @inspector = inspector
        @options = inspector.options
      end

      def format
        colorize(string, type)
      end
    end
  end
end