Sha256: 1889dfe85a280aa09db907dd497cdaaf9d1c63fba5e18fe051269c8954584095

Contents?: true

Size: 294 Bytes

Versions: 1

Compression:

Stored size: 294 Bytes

Contents

module Helium
  class Console
    define_formatter_for Module do
      def call
        light_yellow(object.name || anonymus_text)
      end

      private

      def anonymus_text
        closest = object.ancestors.find(&:name).name
        "(ananymus #{closest})"
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
helium-console-0.1.5 lib/helium/console/registry/module.rb