irobayna/stupidedi

View on GitHub
lib/ruby/hash.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true
module Stupidedi
  module Refinements
    refine Hash do
      def defined_at?(x)
        include?(x)
      end

      def at(x)
        self[x]
      end
    end
  end
end