Sha256: b947f7561fc5e931826ee30f685f8e9a4a57a70e244db0285f26ef9cb19b5114

Contents?: true

Size: 288 Bytes

Versions: 7

Compression:

Stored size: 288 Bytes

Contents

# frozen_string_literal: true

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

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
refinements-12.7.0 lib/refinements/symbol.rb
refinements-12.6.0 lib/refinements/symbol.rb
refinements-12.5.0 lib/refinements/symbol.rb
refinements-12.4.0 lib/refinements/symbol.rb
refinements-12.3.0 lib/refinements/symbol.rb
refinements-12.2.0 lib/refinements/symbol.rb
refinements-12.1.0 lib/refinements/symbol.rb