Sha256: 52b9d17982ff63cb3526359d2d77c7b76fe4167ec14079f0b68fe051e1d7d479

Contents?: true

Size: 378 Bytes

Versions: 2

Compression:

Stored size: 378 Bytes

Contents

# frozen_string_literal: true

module Refinements
  # Provides additional enhancements to the Symbol primitive.
  module Symbol
    refine ::Symbol do
      # rubocop:todo Naming/BlockForwarding
      def call(*arguments, &block)
        proc { |receiver| receiver.public_send self, *arguments, &block }
      end
      # rubocop:enable Naming/BlockForwarding
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
refinements-12.0.1 lib/refinements/symbol.rb
refinements-12.0.0 lib/refinements/symbol.rb