Sha256: 479166bfd29e603360a91fd380801b6be056171e42982db25e124d6fb9a1f9ea

Contents?: true

Size: 497 Bytes

Versions: 3

Compression:

Stored size: 497 Bytes

Contents

module Polyfill
  module V2_4
    module MatchData
      module Instance
        module ValuesAt
          module Method
            def values_at(*indexes)
              indexes.each_with_object([]) do |index, acc|
                acc.push(self[index])
              end
            end
          end

          refine ::MatchData do
            include Method
          end

          def self.included(base)
            base.include Method
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
polyfill-0.6.0 lib/polyfill/v2_4/match_data/instance/values_at.rb
polyfill-0.5.0 lib/polyfill/v2_4/match_data/instance/values_at.rb
polyfill-0.4.0 lib/polyfill/v2_4/match_data/instance/values_at.rb