Sha256: 5fcfdbfddcb87aa650dff75fb4c411c9baa485a67f883a68c758c0109bd5da37

Contents?: true

Size: 286 Bytes

Versions: 1

Compression:

Stored size: 286 Bytes

Contents

# frozen_string_literal: true

module Slack
  module BlockKit
    module Refinements
      module HashCompact
        refine Hash do
          def compact
            reject { |_, v| v.nil? || (v.respond_to?(:empty?) && v.empty?) }
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
slack-block-kit-0.1.0 lib/slack/block_kit/refinements/hash_compact.rb