Sha256: c73a8345ebcc46bdc1b1e15bbff426b381b60b4f348ff1f778d789c57e2cfcc5

Contents?: true

Size: 510 Bytes

Versions: 3

Compression:

Stored size: 510 Bytes

Contents

# frozen_string_literal: true

# @api private
# @since 0.19.0
module Qonfig::Plugins::PrettyPrint::Mixin
  # @param pp [?] Suitable for Ruby's PP module
  # @return [void]
  #
  # @api public
  # @since 0.19.0
  def pretty_print(pp)
    pp.object_address_group(self) do
      pp.seplist(keys, proc { pp.text(',') }) do |key|
        pp.breakable(' ')
        pp.group(1) do
          pp.text(key)
          pp.text(':')
          pp.breakable
          pp.pp(self[key])
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
qonfig-0.20.0 lib/qonfig/plugins/pretty_print/mixin.rb
qonfig-0.19.1 lib/qonfig/plugins/pretty_print/mixin.rb
qonfig-0.19.0 lib/qonfig/plugins/pretty_print/mixin.rb